refactor install script

the script is now split up in parts that will be fetched from github
on demand.
fixes #4047
Merge pull request #4111 from Raven24/install_refactor

refactor install script