Means for converting reciprocating motion into rotary motion or vice versa using pawls and ratchet wheels