Fixes issue #237.

Array#to_nm previous required the NMatrix shape to be given. However,
NMatrix#to_a would return a sequence of nested Arrays. This patch allows an
NMatrix to be converted into an Array, then back to an NMatrix.

Array#shape method is now fulfilled via Proc