Don't recreate header and footer unnecessarily

The only time that they need to be recreated is if the orientation
changes (even then, a good implementation could handle it, but no
point requiring that now).

Task-number: QTBUG-40375
Change-Id: Id0215fb812724827bb139cda8f8dc6208c703852
Reviewed-by: Andrew den Exter <andrew.den.exter@qinetic.com.au>