Prevent APICache from holding file descriptors open until program exit
Prevent APICache from holding file descriptors open until program exit

Previously the `APICache` would keep file descriptors open until the
program exited. This was because of a call to `atexit.register` that
increased the reference count of the `APICache`. However, we always
write to the database after every database change, so this is
unnecessary. Removing the call to `atexit.register` allows the open
file descriptors to be closed when an `APICache` goes out of scope.

Testing Done:
Ran unit tests.

I ran the `test.py` file attached in report of issue 3751 before and
after the change.  Before the change, the list of open file
descriptors would grow with each call to the `doit` function. After
the change, the list of open file descriptors is always be the
empty list.

Reviewed at https://reviews.reviewboard.org/r/6899/

halvorlu/rbtools,halvorlu/rbtools,datjwu/rbtools,haosdent/rbtools,haosdent/rbtools,beol/rbtools,davidt/rbtools,reviewboard/rbtools,beol/rbtools,beol/rbtools,datjwu/rbtools,reviewboard/rbtools,davidt/rbtools,davidt/rbtools,haosdent/rbtools,datjwu/rbtools,reviewboard/rbtools,halvorlu/rbtools