Added function to calculate the L1 regularization penalty.

This function can be used to calculate the L1 penalty update when training a Neural Net. It's much faster than doing:

        l1_penalty = alpha * np.sign(w)
        dw += np.where(alpha > np.abs(w), X, l1_penalty)

Since it's very focused on machine-learning application my guess was that this goes into learn.py instead of cudamat.py.

(I'm not too happy about the functionname BTW, let me know if you have a better name)