Handle double path registration

Canonicalise paths from /var/lib/use-ephemeral/stateful-paths and only
copy files from a path once.

This means that if path /a is registered twice, you don't end up with
/mnt/state/a/a.

Note: symlinks must be relative for this to work. Rewriting absolute
symlinks can be a follow-on patch.

Example (hacked slightly to work as if boo was root):

  $ tree boo
  boo
  └── var
      └── lib
          └── use-ephemeral
              ├── a
              ├── b -> a
              └── stateful-paths

  $ tree boo
  boo
  ├── mnt
  │   └── state
  │       ├── a
  │       └── b -> a
  └── var
      └── lib
          └── use-ephemeral
              ├── a
              ├── b -> a
              └── stateful-paths

Change-Id: I60eb87f44b8b8d122cb4af472327d390e8ba4c23
Co-Author: alexisl@hp.com
Merge "Handle double path registration"