Fix Threshold layer

Fixing layer_factory to enable use of Threshold layer from proto files.