Halsafar refactor tile parsing

Properly handling tile definitions.

Removed a lot of derived junk from the layer tile definition and moved into the tile definition.

Removed more junk from layer tile and left it out as it was fully derivable.  For helper a new helper function has been added to the library to calculate u,v coordinates for a tile based on the tile flat index, tileset with margins and spacing taken into effect.

Unit tests are lacking.