Add missing jsdoc comment
Improve performance in setEmptyData

Creating a new temporary array to pass to setData is not needed
and just wasteful.
Improve performance in setIdentityData

Creating a new temporary array to pass to setData is not needed
and just wasteful.
Add new instance method: copy

The copy method can copy data from one matrix into the current
matrix.
Use the new copy method in the clone method
Add new instance method: isIdentity

The isIdentity method can check if the matrix data represents the
identity matrix or not.
Use new isIdentity to optimize multiplications

If the original matrix is an identity matrix, multiplying it with
anything will be the same as just copying the data from the
other matrix. This allows us to skip over a few multiplications
and just copy the data instead.
Optimize the invert method by setting the new data manually
Optimize the setData method

Reassigning parameters while also mentioning `arguments` in the
function body might make JS engines go into an unoptimized mode.

https://github.com/petkaantonov/bluebird/wiki/Optimization-killers#3-managing-arguments
Optimize the deletion of old values in setData

Deleting all number properties and then recreate the needed
properties is unnecessary work. Only delete the properties that
are no longer needed (if new data is length 16 and the old was 9,
only remove indices 9 to 15).
Move out internal functions for removing a column or row

These helper functions are used in two places, so it's better to
not have the definition in two places. It's also really bad for
performance to constantly redefine the functions.