Implemented a function that constructs an "error object".
Added a generic "application error" error code.

Made services use tangelo.error() when appropriate.
Merge branch 'error-object'

Closes #261