Add unit tests for CLI connection string parser (rebased onto develop)



This is the same as gh-2361 but rebased onto develop.

----

As a follow up of https://github.com/openmicroscopy/openmicroscopy/pull/2358#issuecomment-41378688, this PR:

- converts `SessionsControl._parse_conn()` into a static method
- adds unit tests for the parsing of connection string of the form `(user@)server(:port)`
- adds cosmetic improvements to the matching logic in `_parse_conn`