Refactoring: extracting methods and params.

Preparing for higher granularity singature of the functionality in the
runPermutations function by extracting many functions and breaking out
parameters.
Extracted CLI from Permutations Runner.

- Pulled all options parsing into run_swarm.py.
- Refactored runPermutations into lots of little pieces.
- Replaced runPermutations with three functions:
  - runWithConfig (accepts config dict)
  - runWithJsonFile (accepts path to JSON config file)
  - runWithPermutationsScript (accepts path to permutations.py)
- Updated run_swarms to call into permutations_runner.runWithJsonFile or
  .runWithPermutationsScript

So CLI is still entact, and new public functions exist for using the
permutations_runner directly:

- nupic.swarming.permutations_runner.runWithConfig
- nupic.swarming.permutations_runner.runWithJsonFile
- nupic.swarming.permutations_runner.runWithPermutationsScript
Removed unused imports.
Cleanup and documentation.

Doxygen docs, code cleanup.
Fixed a missing default option.
Library function returns model_params directly.

permutations_runner.runWithConfig() now returns model_params as well as
writing it to disk.
Turned outDir from arg into kwarg.
Updating deprecation warning link.
Defaulting outDir to cwd instead of permWorkDir.
Defaulting permWorkDir to cwd as well as outDir.
SHA of nupic.core updated

to include fix for strerror_r
(but not ->src/ changesm yet)
7d1271c44f0d5ac14be1a4004ba6
Merge pull request #768 from breznak/SHA_update_core

SHA of nupic.core updated
Pylint suggestions
Changing default options to const, not global.
Using perm runner defaults in cli script.
Review changes

- removed commented code
- simplified json file read
- replaced ' with "
Merge pull request #764 from rhyolight/run-swarm-cli

Separates swarming library from swarming CLI
Merge branch 'master' of github.com:numenta/nupic into david-master
Merge pull request #7 from rhyolight/david-master

Merge in master