feat(resize_state): Rework and add tests to resize_state.

The main changes to the existing resize_state script are for fetching
data from udev instead of parsing and gluing together strings. This
makes the script much more generic and now works with loop devices.

The test script is a little crude and needs to run as root since it
needs to call losetup but it does the job.
fix(travis): Try running resize_state script as root on Travis.

There is this passwordless sudo for installing packages... I wonder if
it can run tests as well...