tests: Add assertlocal assertions

This commit adds a new type of assertion: assertlocal_<condition>. This
is useful in subshells, when we want to kill the subshell without stopping
the whole test.