Core/Misc: Throw an exception if client sends invalid float/double data

Throw a ByteBufferException if client sends 1.#INF0000, 1.#QNAN000, 1.#IND0000 or other invalid float/double values.
Handle this invalid values in StaticMapTree::isInLineOfSight() to avoid triggering an assert.
Fixes #12126