Update threads test for coverage/BDD/promises, bug fixes

Boards:
Fixed a bug in boards where purged board were not being moved to the
correct (deleted) DB in the purge method.

Optimized boardByOldId by redirecting flow of control to boards.find
once the new ID is retrieve with the old id.

Changed the boards test to use smf ids as string since that is how they
will come from the mysql db.

Changed the import_delete test to use purge instead of delete since
delete doesn't really affect the legacy key index. Also renamed the test
to #IMPORT_PURGE from #IMPORT_DELETE.

Threads:
Updated the threads test file for full method coverage as per the
index.js file. This includes full BDD testing being used as oppose to
TDD style testing, and fully utilizing promises instead of callbacks.

Implemented a smarter delete method in the db.js file for threads, this
new delete method moves the thread over to the deleted DB like the
original methods by also takes into the account the post_count and title
indexes. The new methods deletes those keys as well now.

Added a new method threadByOldId to gets thread objects from the DB
using the legacy id for a particular thread.

Optimized the byBoard db method to fully utilize promises. Originally,
it would retrieve each thread during the data event. Now it just saves
the value during the data event, and searches for all threads using a
map during the close/end event.

Plugged a leak where the index.js file was returning full thread db
model objects with prototype methods that should only be used in the db.
The .simple() method is called where needed to remove those methods.

Changed the parameters of the delete method to take in an thread's id
instead of a whole thread object.

Added a API interface for the threadByOldId method.

In the thread model.js file, added methods to retrieve the key and
legacy key from a static method where the parameter the id of a thread.
Also added the 'thread' prefix as a property of the thread model object.

All test pass.