Improve reference manual documentation of the methods `goal_expansion/2` and `term_expansion/2`