Thread ordering

front loaded thread ordering on post
Optimized thread sorting

Optimized thread sorting that occurs on every post. The major changes
are: sorting when the thread is already at the top of the board doesn't
happen anymore, if a thread is moved to the top, sorting is only done to
the point where the thread originally was.

Locks have been moved to the vault where locks are now passed out based
on unique ids. This allows multiple boards to sort their threads without
hitting the same lock.