Add code on neural nets implementation

I've refactored the code on neural networks, and firstly push up the head files containing definition of classes. Hope this can make it easier to review code. Thanks.