Reasonably working test code.

testMemoryBuffer.py performs unit test on various data types.
bool and user defined types are not included.

Coverage test result: line 85 (domain_error exception) is the only line
not executed, and it's intended by internal logic so it is fine.