Refactor IMAP locking system to use filesystem instead of database.

Querying the database to check for a lock is too slow and led to race
conditions where duplicate IMAP connections could occur.  Accessing the
filesystem is better, but not 100% foolproof.  WP-cron suffers from the
same problem.

In my testing, the filesystem can handle up to 12 concurrent page loads on
the same second without launching a duplicate connection.  This rarely
happens unless your site experiences a ton of traffic.

The filesystem method can be overriden by redeclaring these functions in a
plugin:
- bp_rbe_is_connecting()
- bp_rbe_add_imap_lock()
- bp_rbe_remove_imap_lock()
- bp_rbe_stop_imap()
- bp_rbe_should_stop()

Handy if you wanted to use something faster like memcached or shared memory.

See #16.