allow loading tmx data from javascript objects instead of only from xhr

Same as https://github.com/melonjs/melonJS/pull/400 except on 1.0.0-dev