[IMP] micro-optimize coversion to cache

* the vast majority of calls to Many2one.convert_to_cache have a None or
  integer value, so special-case those[0]. The third place goes to BaseModel
  so the order for the rest can remain.

* replace dict() call with dictcomp in _convert_to_cache (and memoize the
  _fields dict locally), this seems to improve the runtime for
  _convert_to_cache by quite a bit according to the profiler (because
  _convert_to_cache is called ~1m times)

[0] isinstance could be replaced by a ``type(val) == int``, that would stop
    matching booleans but there's only a few thousand calls to those over
    ~800000 calls