from_python: Fix const T& specialize to avoid specific knowledge of Object

This is necessary for gui purposes, where a similar exclusion is
necessary for QObject-derived classes.