bug fix in numericDeriv
convert to having both shared and unshared versions of ScalarReal, etc.
Use ScalarIntegerShared, etc. in many places