Makes agent quark share common redis code

RM9983

Re-works the quark agent to use the same security groups code as the
plugin. Additionally, moves or removes superfluous files and tests as
appropriate.
Merge pull request #260 from Cerberus98/rm9983_work

Makes agent quark share common redis code