Add tests

Also fixed various compilation errors. One was a syntax error in the
CLAW_GEN_CLONE macro and the other one was related to the constness of
the () operator of the default cloner.