fix clang errors, osx launching

- fixes #192 stupid programmer errors
- should fix the osx crash on startup
fix foreign weapon prefs, weapon columns

- fix for foreign weapon preferences being read incorrectly/crashing
- changed the weapon columns to store both the weapon type and the name
- added the full list of weapon types (can change per worldgen) for role
preferences and custom gridview columns
- the default weapons view still loads based on the group names though
(ie. weapon names without adjectives) to minimize the amount of weapon
columns added
- fixed an issue where loading DT without DF, not loading any saves,
then closing could delete custom views
Revert "remove invalid/duplicate setuid from main from #128", because it makes DT not run on Mac.

This reverts commit ab18ba31de0c68827d52b996dadfdea306e38887.

Conflicts:
	src/main.cpp
Fixed copying memory_layouts in project file
Q_OS_MAC for setSetuidAllowed

cizra's merge fixes #190 (osx layouts)  and fixes #191 (permission
crash)

the call to setSetuidAllowed is explicitly required for osx, but won't
compile on other platforms. for now the Q_OS_MAC check should suffice
until someone with a mac can debug why the setSetuidAllowed called in
dfinstanceosx authorize isn't sufficient.

the docs also say this should only be necessary in qt version >= 5.3
which should also be tested
fix more clang warnings
Fix miscellaneous compile errors, +x dist/dt

- chmod +x dist/dwarftherapist

- fix various clang, cppcheck warnings.