Apply c++11 changes, including consolidated logic for NUPIC_CORE and NUPIC_CORE_SOURCE

Fixes #1485

@scottpurdy I couldn't get it cleaned up w/o cherry-picking those merges, so I just squashed it all into a single commit.