Make errors in the thrift API interface handle-able by the aurora client.

- Add a general exception catch around the code that calls thrift RPCs,
  so that any error that occurs in the thrift code will be turned
  into a ThriftInternalException.
- Modify the client so that it catches internal errors without dumping
  stack, and cleanly exits with EXIT_API_ERROR.
- Add a file for tests of API functionality, instead of co-opting
  existing tests.

Reviewed at https://reviews.apache.org/r/22274/