Backend: Handle API errors in main.

main.js now catches all errors defined in 'errors.js', and
sets the API error appropriately.
Backend: API tests for convert
Backend: Encode and Decode API.

URI and base64 encode/decode now supported through the
/encode/ and /decode/ APIs.