Make as_op instances pickleable.

This should help for https://github.com/pymc-devs/pymc/issues/507.

It may lack some tests.