Loads more UTs, plus bugfix and notes.

UTs to cover all AS flows.

Bugfix for MMTEL call services in cases where there is no body on the
INVITE - we don't want to crash!

MMTEL flows don't all work yet; failing tests are disabled and
comments inserted in code where we need to make a fix.
Merge branch 'dev' of github.com:Metaswitch/sprout into isc-ut-beefup
Reject bad ;orig, and set it correctly ourselves.

;orig can only be set by a known client; other instances are
illegal.

When we set it ourselves, only do it when we are doing it on
behalf of a known client.
UTs, proper trust boundary handling, and comments.

More detailed comments about IBCF ;orig.
Make priority field in iFC optional
Apply review markups.

Clearer to look up the topmost route header again, rather than
relying on a fragile assignment to a local variable a long way
above.
Merge pull request #23 from Metaswitch/isc-ut-beefup

[Reviewer: Mike] ISC UT beefup

Code changes look fine.  I haven't reviewed all the UT test cases - I think that would be redundant in our processes.
Re-enable NoPriority test case (now succeeds)
Merge branch 'ifc-priority-optional' of github.com:Metaswitch/sprout into dev
Fix bad merge - VG guard on wrong test!
Suppress VG errors.

I don't fully understand why we can't get a destroy invocation here,
but I think it's because the transaction isn't actually destroyed
until after a long timer has fired, and we don't wait for that to
happen. For now, just add a suppression.
Merge pull request #28 from Metaswitch/valgrind-fixes

[Reviewer: Mike] Valgrind fixes
Merge pull request #27 from Metaswitch/ifc-priority-optional

Ifc priority optional
Merge pull request #24 from Metaswitch/ibcf-orig

[Reviewer: Mike] IBCF ;orig handling
Remove unreachable throw - replace with assert
Merge pull request #29 from Metaswitch/ifc-priority-optional

Remove unreachable throw - replace with assert
Track lifetime of AsChain objects more precisely.

Fixes a race where one thread could look up the AsChain in the AsChainTable and
start using it, while another thread could could destroy the initial
UASTransaction, destroying the AsChain. Fix is to use reference counting
to ensure the AsChain isn't destroyed until no thread is using it.

Clearly document the life cycle of AsChain at the top of AsChain's declaration.

Hide almost all methods of AsChain itself, so caller must use AsChainLink.
That makes AsChainLink a reference-holder for AsChain. I wasn't quite brave
enough to use RAII here (given the amount of copying of AsChainLink that
goes on), so there's an explicit release() method.

Separate removal from the map (request_destroy()) from deleting the AsChain
object (which happens within dec_ref()).

Explain the lifetime of an AsChain object (and an ODI token).
Shave 10 seconds off UT run time.

No need to wait for any time at all when polling - it's the
instant events we're interested in.

Real run time goes from 51.8s to 41.4s on my box.
Ability to log timestamps. Occasionaly useful.
Allow control of LVC poll timer.

Leave it at 1000ms in production for efficiency.

Set to 10ms in UT for speed.

This saves 6s real time (of 41s), at a cost of 0.2s user time, on
my machine.