Implemented Tristate functionality and made changes in gates.py

Implemented a new state for a wire - None and implemented Buffer Gate
Implemented Logic Contention Detection functionality
Changed the functionality of _updateResult() a  little to improve efficiency and correctness
Fixed corner cases and bugs in trigger(), _updateHistory(), etc
Changed the functionality of setInput() and setInputs() - They can no longer be used to increse number of inputs
Updated the examples according to the above examples
Python 3.x and PEP8 compatible gates.py and combinational.py