[BUGFIX] Fix PHP warning with date function in FormEngine

The timestamp handed to the date function must be of type int
otherwise a warning is issued. Cast the value to int before
passing it to the date function. The important scenarios are
when the timestamp is "0" or "" (blank string).

Add unit test for formatValue function and the possible format
configurations.

Resolves: #62032
Releases: master, 6.2, 6.1, 4.5
Change-Id: I5207ef5b562dd70b9b5e574eef1b9ee59fa836f0
Reviewed-on: http://review.typo3.org/33665
Reviewed-by: Oliver Hader <oliver.hader@typo3.org>
Tested-by: Oliver Hader <oliver.hader@typo3.org>