[8.0>=] Calendar fix virtual id bugs

Hi,

This fix is simple and fix at least 2 bugs (which are not reproducible on the runbot...)

  File "/home/odoo/openerp-8.0/openerp/addons/calendar/calendar.py", line 1738, in search
    return super(ir_attachment, self).search(cr, uid, args, offset=offset, limit=limit, order=order, context=context, count=count)
  File "/home/odoo/openerp-8.0-1218/openerp/api.py", line 237, in wrapper
    return old_api(self, *args, **kwargs)
  File "/home/odoo/openerp-8.0-1218/openerp/models.py", line 1647, in search
    return self._search(cr, user, args, offset=offset, limit=limit, order=order, context=context, count=count)
  File "/home/odoo/openerp-8.0-1218/openerp/api.py", line 237, in wrapper
    return old_api(self, *args, **kwargs)
  File "/home/odoo/openerp-8.0/openerp/addons/base/ir/ir_attachment.py", line 263, in _search
    access_rights_uid=access_rights_uid)
  File "/home/odoo/openerp-8.0-1218/openerp/api.py", line 237, in wrapper
    return old_api(self, *args, **kwargs)
  File "/home/odoo/openerp-8.0-1218/openerp/models.py", line 4561, in _search
    query = self._where_calc(cr, user, args, context=context)
  File "/home/odoo/openerp-8.0-1218/openerp/api.py", line 237, in wrapper
    return old_api(self, *args, **kwargs)
  File "/home/odoo/openerp-8.0-1218/openerp/models.py", line 4386, in _where_calc
    where_clause, where_params = e.to_sql()
  File "/home/odoo/openerp-8.0-1218/openerp/osv/expression.py", line 1245, in to_sql
    q, p = self.__leaf_to_sql(leaf)
  File "/home/odoo/openerp-8.0-1218/openerp/osv/expression.py", line 1229, in __leaf_to_sql
    params = model._columns[left]._symbol_set[1](right)
  File "/home/odoo/openerp-8.0-1218/openerp/osv/fields.py", line 241, in <lambda>
    _symbol_f = lambda x: int(x or 0)
ValueError: invalid literal for int() with base 10: '15-20141215070000'



The second one : 

File "/home/odoo/openerp-8.0-1218/openerp/api.py", line 235, in wrapper
return new_api(self, args, *kwargs)
File "/home/odoo/openerp-8.0-1218/openerp/api.py", line 552, in new_api
result = method(self._model, cr, uid, self.ids, args, *kwargs)
File "/home/odoo/openerp-8.0/openerp/addons/calendar/calendar.py", line 1555, in write
data = self.read(cr, uid, event_id, ['start', 'stop', 'rrule', 'duration'])
File "/home/odoo/openerp-8.0-1218/openerp/api.py", line 237, in wrapper
return old_api(self, args, *kwargs)
File "/home/odoo/openerp-8.0/openerp/addons/calendar/calendar.py", line 1631, in read
select = map(lambda x: (x, calendar_id2real_id(x)), select)
File "/home/odoo/openerp-8.0/openerp/addons/calendar/calendar.py", line 1631, in 
select = map(lambda x: (x, calendar_id2real_id(x)), select)
File "/home/odoo/openerp-8.0/openerp/addons/calendar/calendar.py", line 44, in calendar_id2real_id
return int(real_id)
ValueError: invalid literal for int() with base 10: ''
`unicode` and `str` are both instances of `basestring`, therefore, it would be better to check `isinstance(ids, (basestring, int, long))`