Additional parameters (spacing & margin) for the sliceIntoFrames method

This is needed to easily support tileset images from mapeditor.org. 
In their docu for tilesets (https://github.com/bjorn/tiled/wiki/TMX-Map-Format#tileset) they support images with margin & spacing.
I am a bit unhappy with the position of the parameters but putting the frameCount parameter to the end would probably break a lot.