tmxrasterizer: Return an error code when failing to load the map

Fixes #510