Qt 4: Refactor the shell handling for header generation

It does not make much sense to use branches for only a minor difference, hence
there is now a precheck for the host os and the quote variable is set
accordingly.

This is a slightly modified version of what QtCreator's qtcreator.pro is using.
Basically, single quote is used here for the quote variable rather than double
quote as double quote is causing issues at least on my machine.

Task-number: QTBUG-33125
Change-Id: I9eb0a0a62e1404a095cfc3b1bd68c519552d23b8
Reviewed-by: Sergey Belyashov <Sergey.Belyashov@gmail.com>
Reviewed-by: Denis Shienkov <denis.shienkov@gmail.com>