This patch makes some minor adjustments to ResourcePool:
- Don't initialize the resources if Size is 0 which can avoid assertion.
- Add a new interface function clear to release all hold resources.
- If initial size is 0, resize to 1 when the first request is encountered.