Waveform and Marker fixes.

1) Max waveform count is 20 bits.
2) Marker transition word should depend on the state.
3) Command payload detection should work with int or long payloads.

--BRJ