Add error codes.

I find myself constantly checking the source code to see what each error code represents. I think this should be in the core doc. I'd like to actually add a bit more text, for example, explaining what an encoding error could mean, but for now I figure this is a good start.

(closes #37)

Signed-off-by: Shazron Abdullah <shazron@apache.org>