tests: Add a test of shadow reconnecting to the master

This test verifies is shadow is able to recover it's connection with the
master server if it was lost and some changes in the filesystem have
been made in the meanwhile.

Change-Id: Ia15a7e76ed9c92b3f04e7002b4a460e5c439c385