Port Wahjam to Qt5

Qt5 is now widely available on Windows, Mac, and Linux.  It is therefore a good time to port the codebase over.  Since binaries/packages are available across all operating systems we support, there is no need to maintain Qt4 compatibility.

Ikkei Shimomura (tea) <ikkei.shimomura@gmail.com> did most of the porting work 7 months ago when Qt5 was still new.  I took his patches, rebased and split them up with some minor changes.

The final patch is a compiler warning cleanup using the Q_UNUSED() macro - it's not directly related to Qt5 but inspired by tea's patches.