Convert IdeaStore from a singleton to a instance

Having IdeaStore as a singleton meant that we had to hard code the data
store into the class. Now, we instantiate it as an instance of the
IdeaStore class. This means that we can pass in a different database in
testing and stop the tomfoolery we were engaging in before.