Move custom rf class outside the combsimp definition

This fixes, or rather, works around, a bizarre caching issue involving classes
defined inside functions.  See the discussion on pull request #1710.
Fixes #2676 : Convert Matrix to NumPy Array with NumPy dtype

Exposes dtype to the user. Default dtype is 'object'.
Rename d_type to dtype
Added tests for matrix2numpy
initial attempt
working on
tests pass, refactory in progress
fixed substitution bug and added tests
hash function restored
merged with master
fixes
metric bug fixed, various refactories
inverse metric bug fixed; Kronecker Delta now can have data
tested TensMul.__call__ on contracted tensors
continued fractions functionality enhanced and added to ntheory module
solved code convension errors & error raising functionality changed
global variable removed
modified the function continued_fraction_rational_number(numerator, denominator)
new_beta_function
added newline to end of two files