LOG which requeue filter callback failed

When a requeue filter fails being called instead of just
logging the exception and traceback also log the callback
index which failed and the string representation of the
callback that failed so that when/if it is later examined to
determine the root cause these pieces of output can be used
to isolate the failing callback.

Also includes a drive-by commit to update the add requeue
filter callback documentation to explain what the callback
will be provided and expected to return.

Change-Id: Idf1ae63cfa706551ac0361e802f3b082783e0b9d
Allow WBE request transition timeout to be dynamic

To enable longer (or shorter) timeouts for a WBE submitted
request to transition out of the (PENDING, WAITING) states
allow the transition timeout that was previously set to 60
seconds to be provided as a WBE configuration option (it
still defaults to the previously fixed 60 seconds when it
is not provided).

Fixes bug 1356002

Change-Id: Idf384217004a334df03e2fff9150309fdfe08005
Remove db locks and use random db names for tests

Removed database locks against the database openstack_citest and
implemented random name generation for new databases created just
for persistence testing.
Once the locks were removed, using 'template1' as the initial db
for postgres connections was problematic, because postgres refuses
to create databases when there are multiple connections to
'template1'.  Switched to using 'postgres' as an initial db to use.
Changed _reset_database to _init_db since we are always working
with a brand new database, and removed the 'drop database' before
a 'create database.
Added a _remove_db method to remove the database once testing was
finished.

Change-Id: Iaf1c101df9c268da48db7432bcbc0467f6486bcd
Closes-Bug: 1327469
Expand documention on failures and wrapped failures types

To make it more clear why these objects and types exist and when
and why they are used and reraised increase the verbosity of the
comments and associated inline documentation on these two classes
to help explain there existence & usefulness.

Change-Id: I742bbcd69c71df80e6de7becc8aee153bf16b34b
Reject WBE messages if they can't be put in an ack state

Attempt to reject messages that could not be acknowledged
so that those messages could be resent (requeueing is not
appropriate since it will just cause the message to come
back).

Fixes bug 1364543

Change-Id: I2cb33b39be950528fa9e22d9a11722bedd0927aa
Ensure the cachedproperty creation/setting is thread-safe

When the cachedproperty descriptor is attached to an object
that needs to be only created/set by one thread at a time we
should ensure that this is done safely by using a lock to
prevent multiple threads from creating and assigning the
associated attribute.

Fixes bug 1366156

Change-Id: I0545683f83402097f54c34a6b737904e6edd85b3
Raise a runtime error when mixed green/non-green futures

To avoid the dead-lock scenario when green futures are being
waited on in the same call as non-green futures just disallow
this rare and unlikely scenario in the first place.

Change-Id: I5b57f7aae94ae40d22047b0b085e4d99e034c2a6
Add a docs virtualenv

The various projects are standardizing on a docs venv which
will eventually be called by the infra project to build the
docs for a project.

To enable our usage of this environment add a section so that
it can be called upon.

Change-Id: I420eb0d6e6f9f6f24bc493d4342478daba27ad1e
Update the state graph builder to use state machine type

To build the state diagrams switch from using a custom
algorithm that builds a state machine in a table to using
our state machine class to build those same machines before
translation into a dot diagram.

This also allows us to use the state machine that already
is being used in the action engine as the source of transitions
to build the dot diagram with.

Change-Id: I4a0d16a3fb7c620c2774b535ab952b5d5006e9e9
Work toward Python 3.4 support and testing

Change-Id: Icd0a426e3dd8a44c64e8ba337b36131392715c08
Remove the dependency on prettytable

Instead of pulling in yet another dependency for a mostly
debugging feature lets just have a tiny table object/class
that can work fine for our usage instead.

Part of blueprint top-level-types

Fixes bug 1368975

Change-Id: I21b1bd8152e5bf64b9060d3aabf4384350d05c0f
Add existing types to generated documentation

Also makes some docstring adjustments to make sure
the documentation looks readable (especially the
inline examples).

Part of blueprint top-level-types

Change-Id: Ic6f02ce92449ee23aa9be8645edd8f6f11ee18ab
Add a mandelbrot parallel calculation WBE example

The mandelbrot calculation is neat example to provide
to show how the WBE engine can be used to compute various
calculations (the mandelbrot set in this example).

This will also create an image from the output if a filename
is provided and the pillow library is installed (that library
does the actual image writing).

See: http://en.wikipedia.org/wiki/Mandelbrot_set

Part of blueprint more-examples

Change-Id: I12b9b7a2ce61b17ddaa2930cc9cf266ae0c60932
Mention issue with more than one thread and reduce workers

Due to how it appears the filesystem transport in kombu is
not thread-safe we will work around this by not having more
than one worker active at the same time in this example.

Oddly it appears the memory transport is unaffected (but
from looking at the code it doesn't look safe either), this
may just be due to how the python memory model works though.

Part of blueprint more-examples

Change-Id: Idaf04fb1a6a622af292511bbcf25329c9a5aab53
Example which shows how to move values from one task to another

Part of blueprint more-examples

Change-Id: I05151c3f827d6a8a0b6a7f0aeab17bab2c8ce440
Updated from global requirements

Change-Id: I966ff8ba796774c6ebf5b99ae799bb14196fcf81
Merge "Expand documention on failures and wrapped failures types"
Merge "Update the state graph builder to use state machine type"
Merge "Remove the dependency on prettytable"
Merge "Add existing types to generated documentation"