Fix SCOPE_LOCK to be usable twice in the same scope.

Asias discovered that if SCOPE_LOCK is used twice in the same block,
it gives a compilation error because the same lock name is used for
both.

The existing code attempted to solve this problem using __COUNTER__,
but did it wrongly... The problem is that the "##" c-preprocessor
operator does concatenation before macro expansion, so the literal string
"__COUNTER__" was used, not a numeric counter as we had hoped.
To do this correctly, we need to pass the task to another macro, or
two actually!

A more detailed explanation about the solution:

* #define CONCATENATE2(x, y) x##y
This macro concatenates the two literal arguments passed to it, and only
then does macro expansion. Naively calling CONCATENATE2(_SCOPE_LOCK,
__COUNTER__) would result in just the string _SCOPE_LOCK__COUNTER.

* #define CONCATENATE(x, y) CONCATENATE2(x, y)
CONCATENATE(_SCOPE_LOCK, __COUNTER__) expands to CONCATENATE2(_SCOPE_LOCK,
<actual counter>) and that is now exapnded again to get the actual
behaviour we need.

Signed-off-by: Nadav Har'El <nyh@cloudius-systems.com>
Signed-off-by: Avi Kivity <avi@cloudius-systems.com>