Add JSON_PRESERVE_FRACTIONAL_PART to optionally keep float type

This is based on bug (feature request) PHP#50224 implemented
in https://github.com/php/php-src/pull/642