Whitespace.
Fix building of executables that use TH with dyn-by-default GHC.

Fixes #1252. Makes the test suite pass with GHC HEAD.

(If 'TemplateHaskell/profiling' still fails, you're probably affected by this
GHC bug: http://ghc.haskell.org/trac/ghc/ticket/7978 . Try compiling a more
recent GHC HEAD.)
Test for "vanilla" lib/exe that uses TH.
When possible, use -dynamic-too for exes that use TH.
Make the code a bit more readable.
Rename and rearrange some variables.

Based on discussion with @dcoutts.
Merge pull request #1386 from 23Skidoo/ghc-head-fixes

Fix building of executables that use TH with dyn-by-default GHC.