Wip/hmc sampler

There's probably a bunch of non-idiomatic stuff here.  If anything looks weird, let me know and I'll fix it and do a new pull request.
I'd recommend using infix arrows for types in comments.