[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
yes. it's legacy :wink: