cstub: refactor cstub macros

Simplify the macro interface. Also save and restore input registers
around sysenter call.