Move ret macro to common.h

It can now be used by the Baillie-PSW test, as well as the Frobenius test.
Remove old machine word Frobenius test testing code
Implement the Baillie-PSW test

Not tested at the moment.