[protocolbuffers] add flag for __sleep and __wakeup magic methods.
move functions