Add a 'check' target for better testing.

This makes CTest output the results of failed tests, by default.
Merge pull request #113 from ahmedcharles/testing

Add a 'check' target for better testing.
Refactor dlgProfilePreferences.h/cpp.

Now there is less code duplication. This also fixes a bug where the 'set
colors to default' button didn't work for the map panel.