Upgrade `nock`.
Cleanup package.json

* Remove unused dependencies
* Be explicit about dev dependencies so when installing on prod we do
  not have to do extra work.
* Removed `functools`: it was only used in models/portfolio.js and the
  usage was pretty insignificant. I refactored the function in question
  to not use `functools.compose` and added a test to ensure correctness.