Analytical energy third derivatives for two-configuration self-consistent-field wavefunctions