convnet cpu code enhancement

continue cpu code enhancements and unify cpu\gpu matrix interfaces.