Now mapping backend static routes automatically

The meta data is used to compute all the routes and route patterns that need static mapping (i.e. to index.html). This is still entangled with legacy route management that will be gradually phased out. Closes #174.

<!---
@huboard:{"order":26.75,"milestone_order":177,"custom_state":""}
-->

put in the callback and do some error check