warn against sorting requirements

Change-Id: I64ae9191863564e278a35d42ec9cd743a233028e
Addresses-Bug: #1365061
Add contributing page to docs

Change-Id: Id9cae741bde738ea85a94c0d987347017d12734e
Clarify logging in lockutils

The old logging statements in lockutils made for some confusing log
entries where it would appear a given lock was acquired multiple
times by different threads at the same time.  See referenced bug
for details.

In order to alleviate that confusion, this change does a few things:
1) Adds an explicit "acquired" message inside the lock so it is
   clear when the lock was actually acquired.
2) Moves the release message inside the semaphore so there's no
   chance of it being logged out of order.
3) Removes the "Got semaphore" message and splits it into two
   separate messages depending on whether the semaphore was found
   in the weakref dictionary.  Making it clear which code path
   was followed should help with future debugging.

This is the incubator port of olso.concurrency change
I0fbb473c60d48c9704597d9e3634402857861a66

Change-Id: If863c9d3896bc786f3c9c46196ebb0766e57d863
Closes-Bug: 1367941
Do not incur the cost of a second method call

The usage of dict.get here is unnecessary since dict.setdefault will
not override an existing value.

Change-Id: Ie1b360cc7dd657aafda9f7d9de6c87cdf6c3f97d
Merge "Add contributing page to docs"
Merge "warn against sorting requirements"
Use immutable arg rather mutable arg

Passing mutable objects as default args is a known Python pitfall.
We'd better avoid this. This commit changes mutable default args with
None, then use 'arg = arg or []'.

Change-Id: Ie036e8203deb9ab10ffb7bce1db6cda6c3672a0c
Merge "Do not incur the cost of a second method call"
Merge "Use immutable arg rather mutable arg"