New spatial pooler fully implemented

The new spatial pooler is fully implemented and ready to be integrated into the code base. Its has been rigorously tested to ensure that it is functionally equivalent to the old spatial pooler. However, the changes do not affect the code base. The old spatial pooler will still be in use.