Router refactoring and test coverage

Change AddRoute signature to use ep structs, factor out functions for testability, add unit tests for said functions

Addresses https://github.com/openshift/origin/issues/403
Why does this function need to be public?