Calculation for mode of a tensor
Updated Tensor Mode calculation for n-dimensional array
Cleaned up tests and typos
Doc reference fixes
RF: Rewrite of the tensor mode calculation with no loops.

Also, broke it down into separate functions, added some testing, etc.
Latex squiggle on A for Tensor Mode docs
DOCS + PEP8
RF: got the terms mixed up a bit.
RF: Rebased from master
Removed somehow duplicated code
PEP8
Merge pull request #164 from swederik/enh/TensorMode

Calculation for mode of a tensor