Moved tests to PHPUnit

Most tests were copied but some were rewrote and
some were wrote from scratch.

Other changes because of testing:
- HammingDistance file renamed so that it can now be
  used via autoload
- Utils/MatrixHeap removed and HeapLinkage changed to
  use an SplPriorityQueue because recoverFromCorruption
  does practically nothing for SplHeap
Style fixes with php-cs-fixer