Add routes and hooks to an existing app on import.

Allows routes and hooks for larger apps to be split into multiple source
files, but collected together to form a single "app". Resolves #525.

This pr is to get some feedback to make sure its a reasonable solution.
i.e. it needs to be documented before merging ;)