Fix EZP-20724: Error when creating a content without filling an ezdatetime field

JIRA: https://jira.ez.no/browse/EZP-20724

# Description

When creating a content, if the value of a not required DateAndTime, Time or Date field is omitted, a PDO exception is thrown because the persistence layer tries to set the sort_key_int DB field to NULL.

# Test

manual test with the REST API and the Public API. (And waiting for travis to run the unit tests, I have a segmentation fault at the moment...)