[MachineLearning] Hopfield Network implementation and demonstration code

Summary:
Following the description in MacKay's book and implementation
in https://github.com/johnmyleswhite/HopfieldNets.jl

https://gist.github.com/ajtulloch/7548431 is an example output.

Test Plan: ghc -Wall, quickCheck properties, above gist.

Differential Revision: http://phabricator.tullo.ch/D3