Reduce asnynchronous behavior of HTML client

Purpose:
It happens on more complex screens with rules calls sent by HTML client are triggered in a wrong order or they run in parrallel. E.g. read RowStates for a row is called after deletion of the row, WorflowNextQuery is called even when some read operations like rowstates weren"t finished, etc. It’s probably mainly caused by asynchronous event driven nature of the client.

The idea is to enforce some basic rules the client should respect so that we avoid data integrity and other failures.

I propose:

  1. read-only operations would acquire read (shared) lock, so more than one read-only operation can run simultaneously
  2. read-write operations would acquire write (exclusive) lock, which means it has to wait for all read-operations to finish (and block new ones since claimed). No more than one write operation can run.