Fix cmake build.

Add definitions for the APP_* defines and remove a file which was removed
in a previous commit but the merge went poorly.
Merge pull request #15 from ahmedcharles/merge_fix

Fix a bad merge from merge 7580b5d.
Deleting the host will make pH a dangling pointer, so remove it from mTabMap first.