Enh/glm trial estimates: initial interface to hrf_estimation + all kinds of support functionality

NOT TO BE MERGED (yet or ever).  Primarily pushing so may be some pieces/ideas could be reused e.g. for #189