Added the essentials to use weighted samples.

- Change data layers to read sample_weight.
- Modified SOFTMAX_LOSS and EUCLIDEAN_LOSS to understand sample_weight.