DMPlex: simplify restore closure calls

Only ever check out into a single work array and restore at the very end
of the function in all cases depending on whether that array is still
NULL.
DMPlex: type-annotate a few final loop variables