[YAML] Parse mappings with keys containing # characters

| Q             | A
| ------------- | ---
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #11700
| License       | MIT
| Doc PR        | 
I actually copied most of this code from [here](https://github.com/symfony/symfony/blob/master/src/Symfony/Component/Yaml/Inline.php#L297-307). But I think you're right and that it should also be changed there as well. What do you think?