Improve error handling

I tried to improve the error handling by adding `error` as a return value for most functions.
It requires `mapnik_map_last_error` see: https://github.com/springmeyer/mapnik-c-api/pull/5

It's still a work in progress:
- [ ] `mapnik_map_last_error` needs to be merged in mapnik-c-api
- [ ] errors in the `RegisterXXX` functions should be handled as well
- [ ] add tests