Fix context shutdown & move notify_map_view

This pull request allows the GL context to be shutdown cleanly.

First it adds View::make_inactive() which is called just before the rendering thread terminates to clear the GL context from the thread. This is needed to ensure the GL context will be deleted properly.

Second it adds Map::terminate() which is to be called before destroying a GL context to ensure any GL resources held by Map are released. It is synchronous and uses the calling thread to make the GL calls.

Map::terminate() allows an application to destroy and recreate the GL context as needed without having to first delete the Map object. This is needed on Android as the GL surface can be destroyed without closing the app.

This pull request also moves notify_map_change from a global callback to a callback in View. This allows for their to be more than one active Map object.

Fixes #340, #341 and #346.