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.