Add check on recursion depth.

If the Async recursion level goes past the max_depth. Then it fails
silently.
Add test for max_depth check

Add test_max_depth which ensures that when an Async reaches past the
max_depth, then it will cease and an info log will be put out.
Add depth incrementing

When the job is executing, the current_depth option is incremented.

Add test to ensure incrementing works.
Fix depth incrementing so that new asyncs updated

When a new Async is being started as the result of a finished Async, or
in the case of an Async restarting, the options will be updated with the
correct next_depth.

Tests have been updated and added so that both cases of a new Async
started and an Async being restarted, the increment is checked.
Add propagation of max_depth in Async options

Ensure that when a custom max_depth is set, that it is propagated
onwards down the chain through either the restarted Async's options or
the new Async's options.

Add tests to cover both new async start and restarted async.
Move recursion options into '_recursion' dict

Move max and current depth values into a single _recursion dict with the
Async options.

Update tests to reflect this change.

Change max depth reached logging message to warning level.
Merge branch 'master' into max_recursion
Remove max recursion check code from processors

The max recursion check code is being moved into Async and out of the
processors run_job() function.
Add Async._check_and_update_depth()

Async._check_and_update_depth() is a method that will update this
Async's current depth and max depth from an executing Async. It is
called from within the start() method to determine if max recursion
depth has been reached.
Mock out _check_and_update on start() tests

mock out _check_and_update on the tests for start() as the depth is not
what those functions are testing. This prevents a problem with
_check_and_update_depth from invalidating those tests.
Tweak Async._check_and_update_depth and add tests

Tweak dict handling in _check_and_update_depth and add tests for
_check_and_updated_depth
Merge branch 'master' into max_recursion_async
Merge branch 'master' into max_recursion_async
Change _update_and_check_depth to _check_recursion_level
Change tests to use new name, remove mocking

It is unnecessary to mock _check_recursion_level in the tests so they
were removed.

Changed tests to use new _check_recursion_level name
Use get_current_async and preserve new custom max

Use get_current_async to get the executing async instead of
get_local_context.

If an interior Async inside a chain sets a new custom max_depth, ensure
that value is propagated instead of the existing cusomt depth.

Add test to cover the scenario of a new interior custom max_depth.
_check_recursion_level now raises Abort

When the max recursion depth has been reached, an async.Abort exception
is raised.

Update tests to comply with Abort exception.
Move and rename _check_recursion_level call

Rename _check_recusion_level() to _update_recursion_level and move the
call to it from start() to __init__. This way the depth is incremented
upon creation of the Async.

Move the checking logic out of async and into processor.run_job(). Now
it is predictable when the current_depth is reached and the Abort is
thrown.
Merge branch 'master' into max_recursion_async
Update tests and move decrement to to_dict

Move decrement operation to to_dict.

Update all the tests to accomodate new max depth changes.