refactor queue functions into a new, non-singleton class "Queue"

DEPLOYMENT:
* must run: drush dl registry_rebuild; drush rr

TODO:
* fix tests

Change-Id: Ia3d287fed4e959c83270f4aea4ec30bf5de6bddc
Merge "refactor queue functions into a new, non-singleton class "Queue""