cleanup: much simpler test makefiles and use googletest
fix: must copy a new object, this was thread unsafe and just wrong