local: Update local library interface.

Refactored interface to incorperate lessons learned so far trying to implemend
a whoosh based local library.

Search now has a limit and an offset to account for fact that we need to start
doing pagination of results properly. Updates now have begin, flush and close
calls. Additionally I've added clear method to allow for easily nuking the data
store.
local: Add flush threshold to scanner.

Instead of triggering every 1000th query, this is now configurable and also
triggers the flush call to the library.
local: Add --clear flag to scanner.
local: Add --limit to scanner.