Router checks controllers for resource if no asset

This fixes a regression put in a couple of commits back.
Add promises for iterators.
Rewrite framework to be non-blocking.

Large amounts of code have been thrown away and the user interface has
been heavily modified to use a continuation passing style. I've also
got rid of the pointless actions code and path resolution.

Now you create a function in the resource file for handling the http
method as you need it.