delete unused DiscreteResourceManager from SerialLinearSystem
fix bugs that allocated resources were not registered
remove DiscreteResourceManager. at the moment, allocation and deallocation of LinearSys and Vec are inconsistent