Migrate endpoints during upgrade.

broker code for endpoint upgrade of gears

Fix unit tests.
card_169
bug 997924: jbossas-7 build fails if the app has mock-plugin addon
Merge pull request #4209 from mrunalp/dev/upgrade_endpoints

Merged by openshift-bot
Merge pull request #4204 from lnader/master

Merged by openshift-bot
Merge pull request #4210 from bparees/mock_error

Merged by openshift-bot
Up tries on http assertions in functional API
Merge pull request #4212 from pmorie/dev/fix-tests

Merged by openshift-bot