added CardinalityError in Exceptions.py
made pep8 complaint
changed TabularCPD class to inherit Factor; added reduce, marginalize, normalize methods
changed set_cpd as TabularCPD has changed
removed marginal_probability function