Fix filterCategory in StudyActivity.
WIP fixing tests
Fix race in LearnQueueManager for refilling queue.

Also fix several unit tests.