ISPN-2959 Improve the release scripts

- Only bump version if releasing a Final and also commit version bump on the branch being released
- Make some parts of the scripts less specialized so that it can be used for Infinispan Server

https://issues.jboss.org/browse/ISPN-2959