Merge and bug fix of Habib's changes.js

Jira issue: WP-1319
Factor out proxy fetching code so that it can be called from more than one place.

Jira issue: WP-1318
Revert changes to re-connection logic.

Was causing Linux PZP to fail to re-connect when PZH comes back online.

Jira issue: WP-1319
Merge pull request #82 from TobyEalden/habib-fixes

Merge and bug fix Habib's changes