[NUCCORE-1211] Change QueryManager to be an interface and add
implementation