[3.6.x] Cherries from master for 3.6.x

Preparations for upgrading 3.6.x to include some recent changes in master.
Its purpose is as a start-point for reviewing what we want in 3.6.x.
This includes everything I've accepted into master except:
* @markburgess's branch (#1895)
* d23fee8997 @jooooooon's fix-timing-option (#1899), a fix to Mark's changes
* 51ca2ac5, b2e5b9b @nickanderson's mustache test and my fixup for it
* 4d85b39d made examples/returnszero.cf's expected output match reality, following Mark's changes
* changes from #1905 and #1907 to `libpromises/processes_select.c`, which fix some from #1871 that aren't (needed or) included in 3.6.x.
* my ACL fixes, #1897 and 49258153202cfa131ef40d687ca08bc97f26f4aa, from #1893, pending review by @jimis
* the stime fix, 881a1d51f996d2550d8de2151aee72a96ae8bf15 from #1849; its test fails here.

and, of course, lots of merge commits.  Does also include (as first commit) one leak-fix from #1871, that was previously left out of 3.6.x.