Improved parallelism

Improvements which enable PostgreSQL to use query parallelism in more situations.