Executor/pdu: various fixes and improvements ahead of the async service
We are about to introduce a new service to the PDU library, so let's first land the changes that I accumulated as a dependency for it.
Some of them are not strictly necessary, but since they are nice cleanups I decided to keep them here.