newSharedPool

Creates a new shared pool, using the supplied lambda as a constructor.

The reason for this complicated structure is that a pool should not be shared between contexts as it makes coil fuck up, and theming.