Make a more specific locking to improve concurrency
The current lock() method of cursor is too much generic; it locks all the table when it could be more specific and allow more concurrent work.
I recover the review99902 proposed for #2280 (closed).
This new lock should be used in stock move locking by product as is done in the review, and in SequenceStrict.get_id() locking by sequence.
If this solution is accepted (in the "rationale level"), the patch must to be extended to have a way to get the "lock ID" despite of have the LOCK_TYPE constant.
It should be also extended to allow "no wait" locks adding an ew "nowait" param to advisory_lock() call, but for us the default behaviour should be "wait".
The proposition to manage "lock ID" is to have a new table ("ir.lock_id"?) with a unique name field, and the record ID will be the id used for lock.
This table will be filled in by XMLs.