Add unit tests for username with @ and : characters and bad port

- Increase stringency of regular expression to match up to 2 digits for ports
- Test crazy connection string with user containing : and @ characters
- Add test with invalid port and check the port is parsed with the server name