[Yaml] Ensure whole number floats have their data type is persisted.
feature #11976 [Yaml] Ensure whole number floats have their data type is persisted. (Alex Pott)

This PR was squashed before being merged into the 2.6-dev branch (closes #11976).

Discussion
----------

[Yaml] Ensure whole number floats have their data type is persisted.

| Q             | A
| ------------- | ---
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | Yes
| Fixed tickets | N/A
| License       | MIT
| Doc PR        | no

See http://yaml.org/spec/1.1/#id858936 specifically the spec about specific data types.

Sample code that exposes the issue:
```php
$yaml = new \Symfony\Component\Yaml\Yaml();

$expected = array('float' => (float) 1);
$test = $yaml->parse($yaml->dump($expected));

if ($expected === $test) {
  print "match!\n";
}
else {
  var_dump($test);
}
```

This will output
```
array(1) {
  'float' =>
  int(1)
}
```

Commits
-------

6a507cc [Yaml] Ensure whole number floats have their data type is persisted.