Added a common base class for kistream and kostream
Moved init of IRQ handling code to before global constructors are run