Fixing some issues w/ cacheless testing.

A number of tests were failing when the cache was turned off. Main fixes
included changing some "is" statements to "==" statements, and implementing
equality/sameness tests for UndefinedFunction and AppliedUndef.

Still have 2 errors present, in test_diffgeom and test_traverse. Checkout the pastebin containing tracebacks:
http://pastebin.com/jeYcntTv
The test_traverse error seems to be happening because Basic.__new__ is being called to create a Pow object.This doesn't seem to work.
The test_diffgeom error seems to be a point-of-substitution problem.