Added multithreading capability.

Also made sure that calcium channels contributing calcium ions bound
to Y sites are properly counted.