Fix block.py and add test for file block.py

For Block class:
  Add docstrings for functions in block.py
  Fix references to attribute so all self.type not split between self.type and self.id
  Add id property to maintain backwards compatibility
  type and data are always integers and should be treated as such in `__repr__`
  As `__cmp__` no longer in Python 3 need to use functools.total_ordering which is in 2.7 and 3.*
  https://docs.python.org/2/library/functools.html#functools.total_ordering
  https://docs.python.org/3/library/functools.html#functools.total_ordering
  Define `__eq__` and `__lt__` and others are created automatically

For blockType enumeration:
  Move to back ported IntEnum as allows direct integer comparison
  https://pypi.python.org/pypi/enum34
  https://docs.python.org/3/library/enum.html#intenum

Add test_block.py:
  A unit test module to test the block file
I may be alone here, but I'm unconvinced by the value of testing constants - persuade me...?