Added ioManagerCapabilitiesChanged function that is called from RTS to notify the IO manager that the number of capabilities has changed.
Introduce IORef to refer to array of IO managers.

This change prepares the way for supporting changing number of IO managers when number of capabilities changes.
Replace use of numCapabilities with getNumCapabilities.

Prepares the way for supporting changing number of capabilities.
Minor refactoring: pass eventManagerArray to startIOManagerThread.
Support increasing number of capabilites in the multicore IO manager.