excalibur: Break into functions that can be called recursively. Add options for alternative dumps.

Signed-off-by: Martin Stone <martin@d7415.co.uk>
(cherry picked from commit f20703ae547f06ee72d341003cad137b170159a3)
(cherry picked from commit 189dd8b9ac217c6b7d99f59564775bab7b15a35b)
excalibur: Bugfix.

Signed-off-by: Martin Stone <martin@d7415.co.uk>
(cherry picked from commit 7bfdc7156925667f07c908c4b877d71ca906ff7e)
(cherry picked from commit 32a36a1fb827349cfa51bc181915cfcb052d73bf)
excalibur: penis, request closing and cache clearing only need to be done once, for the most recent tick.

Signed-off-by: Martin Stone <martin@d7415.co.uk>
(cherry picked from commit 2728fe0cc3821c2cbf3c06d3fe61d91af244ed47)
(cherry picked from commit 124dce82fe97c9cebb4fd98ae0c71e9cd2182f12)
excalibur: added dump options.

Signed-off-by: Martin Stone <martin@d7415.co.uk>
(cherry picked from commit ddf1a05ae3fbbbd96d54f12a8112756320687a32)
(cherry picked from commit c3942ff54b5c314c02da289a895f11422c875e8c)
excalibur: bugfix.

Signed-off-by: Martin Stone <martin@d7415.co.uk>
(cherry picked from commit 25778743fa123862dceb56e99d8e99394c015592)
(cherry picked from commit eadc6abe98045a40194ed8f1de314961cf4500e3)
excalibur: Create dump directories before dumping into them.

Signed-off-by: Martin Stone <martin@d7415.co.uk>
(cherry picked from commit a02cc155f8e4049a0f2ce0c67ab62023cb566ffa)
(cherry picked from commit f751f2464c93f858bb7b2edd5b7bb85bc24f76db)
excalibur: Made older-python-friendly. (Make fewer assumptions about errors)

Signed-off-by: Martin Stone <martin@d7415.co.uk>
(cherry picked from commit ff27d19caa7a4db4b44932c301a668bb68101b72)
(cherry picked from commit d1a5ea2d70571a69b4967cf75272b3803eee6dd9)