Refactored the EdgeBasedNode class.

This includes more robust computations in ComputePerpendicularDistance.
There were cases where ComputePerpendicularDistance divided by zero and had
to handle special cases, even though this was not necessary.
applied requested changes to EdgeBasedNode.h
minor change
minor copy-edits to PR #946