Implemented reference counting for linear operators. Operator algebra test has no memory leaks now.