[WIP] General API

This is a first attempt to implement the ideas in https://github.com/JuliaStats/RegERMs.jl/issues/3. 

*Current issue*: types and functions for losses (see, e.g., loss.jl; other files are only adapted for testing).

Next steps: tbd
hmm I thought f like function value. I don't like ``x``, because it can be confused with the input ``x``, but perhaps f is also not the right choice. Perhaps something more self-contained, like ``dec_val``?