Make the way stash is stopped for upgrade configurable.

- Add param $stop_stash paramter
- Add test for upgrades
Add support for permgen JVM option
Merge pull request #28 from mkrakowitzer/f3792625/permgen

F3792625/permgen