Rearrange includes to improve compile times.

This also allows for memory leak checking on MSVC by having include
surrounding Qt headers, which break if you have a macro define new
to be something which tracks line information.
Agreed, can just add it in when we need it (it's not a very tedious thing) - I think we got the good reduction in compile times because unnecessary headers were removed.