fix numeric & boolean & float keys in array

This is my idea to fix #766. We only convert the item to string when necessary (for `array_key_exists` calls`) and leave it as-is otherwise. I tested it and the tests all pass.
<del>It can be refactored of course, so the conversion is done less often. But this way, you can see where the conversion is needed and where not.</del>

The main point is, that $item should not be converted when accessing `$object->$item`. This way, also the SimpleXml test case passes.

By investigating, I also found out that twigs behavior is not consistent with phps for boolean and float key. I fixed that too since its highly related.