WL#1943: Internal GEOMETRY type

Affects: Server-7.0   —   Status: Assigned

Now GEOMETRY objects are internally represented as binary strings containing
WKB representation of the shape.
It sometimes works ugly:
  - if one does SELECT geom_field FROM geom_table; he gets unreadable output
    in 'geom_field' column
  - the result of various dump methods is also unreadable - one just sees
     long lines of binary digits or even 'binary' strings as SELECT INTO result
  - very often WKB representation contains unnecessary data:
      - type of the object (if the field declared as POINT for example)
      - byte ordering (it's better to use just one ordering internally)
  - we are limited with OpenGIS set of geometry types. (users already
    asked for Box() type for example)

I'd propose to do this:
- to store data in the 'internal' format which is similar to WKB but
  with MySQL normal byte ordering and without unnecessary fields.
- make AsWKB() function to build proper WKB
- create Item_geom_func to be an ancestor to all Items returning GEOMETRY
- add new val_geometry() method to the Item to return internal
  GEOMETRY object (only when HAVE_SPATIAL)
- make val_str() functions of that items (actually of Item_geom_func) to 
   return geometry object in the 'complete' form like 'SRID=12; POINT(1 2)' 
- make 'creating geometry values' functions (Point(..), Linestring(..) 
    and other similar functions) to return internal GEOMETRY representation,
    not WKB.
- add val_geom() method to Field_geom, and make it able to read 'complete'
  textual representation