Very rough initial attempt at HAL compliance

This is very much a work-in-progress; most endpoints are still broken,
but the general idea is there, although it needs quite a bit of
refinement and refactoring. I would like to make the individual endpoint
implementation register their static data and take it from there -- it
will make it a lot cleaner that way.