Moves handling responsibility to Endpoint. Adds special endpoint for root handling, because the old one always matched all URLs and had to be last in the list. Adds tests for new Endpoint. Adds completely asynchronous handling in Endpoint and server logic (currently still wrapped in Future.sync() since it is mixed with sync calls).
We should actually wait for the future to return. Also return some error information in the response.