shared: Fix recovery after an interrupted build

When build process is interrupted (like when the buildout process
terminated by SIGKILL), building with shared leave the system in a state
that looks like installation succeeded, so next execution will assume
the part was properly installed.

The behavior was something like this:

    if isSharedPartSignatureOK():
      useThisAlreadyInstalledPart()
    else:
      writeSignatureInSharedPart()
      try:
        build()
      except:
        removeSharedPart()
        raise

and when program is terminated during build step, the signature is
there.

The fix is to write signature later, algorithm becomes:

    if isSharedPartSignatureOK():
      useThisAlreadyInstalledPart()
    else:
      try:
        build()
      except:
        removeSharedPart()
        raise
      writeSignatureInSharedPart()
27 jobs for fix/failed_build in 0 seconds
Status Job ID Name Coverage
  External
running SlapOS.Eggs.UnitTest-Jerome.Python2

38349:34:18

running SlapOS.Eggs.UnitTest-Jerome.Python3

38349:35:26

passed SlapOS.Eggs.UnitTest-Jerome.Python2

00:16:05

passed SlapOS.Eggs.UnitTest-Jerome.Python2

00:27:21

passed SlapOS.Eggs.UnitTest-Jerome.Python2

00:12:37

passed SlapOS.Eggs.UnitTest-Jerome.Python2

00:13:08

passed SlapOS.Eggs.UnitTest-Jerome.Python2

00:25:27

passed SlapOS.Eggs.UnitTest-Jerome.Python2

passed SlapOS.Eggs.UnitTest-Jerome.Python2

00:30:04

passed SlapOS.Eggs.UnitTest-Jerome.Python2

00:22:37

passed SlapOS.Eggs.UnitTest-Jerome.Python2

00:17:58

passed SlapOS.Eggs.UnitTest-Jerome.Python2

00:17:57

passed SlapOS.Eggs.UnitTest-Jerome.Python2

00:12:11

passed SlapOS.Eggs.UnitTest-Jerome.Python2

00:16:22

passed SlapOS.Eggs.UnitTest-Jerome.Python3

00:15:52

passed SlapOS.Eggs.UnitTest-Jerome.Python3

00:15:14

passed SlapOS.Eggs.UnitTest-Jerome.Python3

passed SlapOS.Eggs.UnitTest-Jerome.Python3

00:31:21

passed SlapOS.Eggs.UnitTest-Jerome.Python3

00:19:13

passed SlapOS.Eggs.UnitTest-Jerome.Python3

00:19:26

passed SlapOS.Eggs.UnitTest-Jerome.Python3

00:16:31

passed SlapOS.Eggs.UnitTest-Jerome.Python3

00:14:26

failed SlapOS.Eggs.UnitTest-Jerome.Python3

00:16:41

passed SlapOS.Eggs.UnitTest-Jerome.Python3

00:14:52

passed SlapOS.Eggs.UnitTest-Jerome.Python3

00:27:54

passed SlapOS.Eggs.UnitTest-Jerome.Python3

00:19:11

passed SlapOS.Eggs.UnitTest-Jerome.Python3

00:11:28