Recent patch from keystone[1] do not work when
osprofiler is enabled as osprofiler does jsonutils.dumps
and datetime.date is not handled so it fails.
This patch adds the handling for it.
[1] https://review.opendev.org/c/openstack/keystone/+/924892
Needed-By: https://review.opendev.org/q/I1b71fb3881dc041db01083fbb4f2592400096a31
Related-Bug: #2074018
Closes-Bug: #2076430
Change-Id: Ifbcf5a1b3d42516bdf73f7ca6b2a7338f3985283
(cherry picked from commit f6e879db55)