Refactor losses and structure

There are multiple kinds of methods that can be expressed as a
regularized empirical risk. To implement them it seems to be useful to
distinguish between different loss functions, e.g. for conditional
models vs. generative models, regression and classification, and
multiclass vs binaryclass output.

See, e.g., https://github.com/JuliaStats/RegERMs.jl/issues/3.