Pull out static method calls into specific functions

This will make it easier for extending classes to substitute
the Connection class with their own (which may not be
CirrusSearch\Connection) - Also made those methods protected
so they can actually be extended.

Change-Id: Id188ebe59a14149198e65f37a830d2e9b1a22eb5
Merge "Pull out static method calls into specific functions"