A Generalized Commitment Machine for 2CL Protocols and its Implementation