Refactoring router.go to handle errors. Improving code coverage.

@rajatchopra Could you please review ?
Most important part to review, is removal all method cmpStrSlices which was quite hard to unit test, so tried to replace it with a sort+string comparison.
As discussed, I also added Error to returned values to better handle error cases.