Refactor served-user determination.

We should only look at P-Served-User for originating and retargeting cases, not
for terminating.
Merge branch 'multiple-as-chain' of github.com:Metaswitch/sprout into orig-cdiv

Conflicts:
	sprout/stateful_proxy.cpp
Retarget if req-URI doesn't match.

WORK IN PROGRESS.
Retarget chain if req-URI changes.

Don't need retargeting flag after all - we can tell all we need
from the session case.
Tidy up code.

Push ifc_handler null test into create_as_chain.
Make compile and fix UTs.
Extra logging, and an orig-cdiv UT.
Additional AS UTs.

- Test handling of an expired ODI token.
- Test interaction with MMTEL AS.

Also:
- Improve logging.
- Enhance the fake XDM to support MMTEL testing.
Merge branch 'dev' of github.com:Metaswitch/sprout into orig-cdiv
Review markup: pass pool implicitly.

Rely on pool in rdata, rather than passing explicitly.
Merge pull request #20 from Metaswitch/orig-cdiv

[Reviewer: Mike] ISC orig-cdiv handling