Normalising data for calculate_center()

The sharing plugin passes arrays to the Json_controller::calculate_center() function, while it can come in as stdClass from a few other venues. This normalises it all to an array so the looks likes it.

This is somewhat a lazy solution, but transforming an array to an stdClass is not as straight forward. Also, this avoids re-writing other bits of code that call calculate_center(), which can introduce other bugs.

BTW, I'm **VERY** surprised this didn't come up during testing. It is fairly major.