Break api error handling into a new pkg
Use new api/errors, get rid of api.* error code
Merge pull request #900 from thockin/cleanups2

Move validation errors into a pkg