Implement complete test vectors for insertion and pruning, and move into their own file. Implement retrieval of statistics by prefix key and various bug fixes exposed by the test code.