Added pulse-in; added debouncing

Added the pulse-in node code. Added simple debouncing logic to
discrete-in (note: this implementation may be badly affected if there
is a lot of very fast bouncing.