add more ArrayBasedModel unittests
cleanup of ArrayBasedModel

Move some functionality into SMatrix classes so both can be treated
identically instead of checking for type and doing different operations
throughout the code. Makes things cleaner and simpler.