Chart\InlinePie: locale-ignorant casts for floats

PHP respects locales (LC_NUMERIC) when casting floats to string. That
affected the generated HTML for our inline pie charts. This patch is
not that beautiful - but fixes this.

fixes #6348