Implements missing FlattenerLayer functions.

FlattenerLayer is missing some functions, like get_weight_decay.

This PR is about adding these missing functions.

A similar PR is needed for CompositeLayer, but I wait bartvm PR to be merged before sending one.