[FIX] Refer to context_datetime as static method which will make it work for function fields
[IMP] context_today should apply to function fields also in order to show them in qweb reports
[IMP] test cursor: code cleanup to make it more robust to concurrent accesses