libparted: Fix check for backup header location

Add a couple of helper functions for calculating the partition table
entry size (in sectors) and for guessing the end of the disk based on
the LastUsableLBA and the Partition Table Entry size.

The backup header should be either at the end of the disk, or at what
the primary header thinks is the end of the disk. Prompt to fix the
backup header if it is located any other place.

* libparted/labels/gpt.c (_ptes_sectors): New function
  (_hdr_disk_end): New function
  (gpt_read): Use new function to test for pri's idea of end of disk
libparted: Use common function to calculate PTE sectors

Use _ptes_sectors in _parse_header's calculation to determine if the
disk has been grown.

* libparted/labels/gpt.c (_parse_header): use _ptes_sectors
tests: Add emit_superuser_warning for gpt tests

When parted runs without script mode it will print a warning about not
being superuser. Add the library call to add this to expected output
from the tests.

* tests/t0281-gpt-grow.sh: Add emit_superuser_warning
* tests/t0282-gpt-move-backup.sh: Add emit_superuser_warning
* tests/t0283-overlap-partitions.sh: Add emit_superuser_warning
tests: Use msdos-overlap to setup t0283

xxd isn't present in minimal build systems, as it is part of vim. Change
to using a simple python script to mangle the msdos disklabel for the
test.

* tests/msdos-overlap.py: New file
* tests/t0283-overlap-partitions.sh: Use msdos-overlap.py