Implement activation functions

Hyperbolic Tangens and the Sigmoid function seem to be the most common
activation functions. Both are implemented as much as possible on
Java's math support.