Allowing user-supplied functions for link and variance. Also renames lagr.sel to lagr.tune