Pass compiler flags down into leveldb make

Fixes issue#2288. Includes cleanups from Luke's pull 2243.
Minor build fixes

Two changes: make some linux-specific linker options linux and linker specific.
And in the cross-compile environment, prefer the $HOME/qt/bin tools to
whatever might be somewhere else in the path.