remove a lot of un-needed or duplicate code

There's a lot of code in the atomspace that isn't really needed; removing it bit by bit.

Net result was a bit of a speedup; 5% to 50%, depending on the function.