Add error codes to the server

Now, instead of just calling error callbacks with free-form arguments,
the server will always call them with arguments in the form:

    function(error_code, [message], [data]);

Error codes can be found in `L.models.Server.errors` (for now).

Also, we now call the error callback if a note fails to commit.