Permit users to specify custom ports (history re-written)

I've taken the liberty and gone ahead rebasing @timblack1's changes into a single commit as discussed in https://github.com/hoodiehq/hoodie-server/pull/286

Hope this helps ;-)

cc/ @janl