initial commit, just some basic primitives

popcount / hamming weight
persistent array manipulation via O(n) copying
some tests to make sure this works