Move ApiError class from rest-swagger to rest project.
TypeCoercions throws ClassCoercionException

Rather than ClassCastException. DefaultExceptionMapper in rest project
treats coercion exceptions as bad requests and other cast exceptions as
server errors.
Add optional 'details' field to ApiError

* Serialised as empty string if missing
* Added builder for constructing ApiError instances, with static
  fromThrowable(Throwable) helper
* DefaultExceptionMapper logs throwables at trace.