Get rid of copy and paste code in installer/ and unify them.

The powershell scripts had lots of duplication. Make the unified
code instead.
Original patch was provided by Craig Ringer.
Clear unused stuff from PgDtc_isolate() function. Also add CC_initialize_pg_version() call after CC_copy_conninfo() so that illegal calls for PG_VERSION_xx()
doesn't hurt so much.