[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
I think we can use ``x``, ``p``, ``u``, or ``v`` to denote the prediction value. ``f`` is usually used to represent a function of some sort.