The generalized Chapman-Richards function and applications to tree and stand growth