Add support for Input() and Output() (available in Chisel2 since ucb-bar/chisel2-deprecated#734) and test for same. (cherry picked from commit 8f96e509)