Add support for port parameter to postgresql::server

Same as #399 but cleaned up/squashed commits, freshly rebased against master.