[WIP] pickle Overloaded objects, with some limitations

See issue #795.