Add statically typed C++ implementation

Currently supports up to commit 6303a80 of the spec.
Merge pull request #125 from evilncrazy/patch-1

Add statically typed C++ implementation