updated cpu implementation to support border in pooling, and make unittest works again