core: Use max_age config setting in expires callback of controller_lib. Fixes #749