improve HAL renderer

* full path uri
* http://example.com/{scheme}/{uri} format
* URI converter
* service composition
improve contexts/api.php

 * system startup error handling
 * /{scheme}/{path} API URI format
 * json encode error
 * $query may take $_POST as well as $_GET
fix typo