Add some more functionality to string.format

The new checks in i,d and o,u,x,X probably aren't correct, but seem to work. (Wasn't sure how to translate that into LuaJ)