Refine Jinja2 whitespace handling
Enable trimming newline after blocks, enable removing whitespace from the start of the line to the block, and enable ensuring the output has a trailing newline, in Jinja2 environment.
This works towards avoiding extra whitespace in reformatted output, where LXML blank text removal heuristics is getting confused, such as the "partitions" element having whitespace inside.