contractor: clean up locking in managedNewContract and add call to prune pubkey map on startup

5 jobs for <span class="ref-name">contractor-ndfs</span> in 56 minutes and 16 seconds (queued for 1 second)
Status Job ID Name Coverage
  Lint
passed #155018128
lint

00:03:45

 
  Test
failed #155018131
integration-tests

00:35:42

75.0%
passed #155018129
legacy-tests

00:10:00

53.0%
passed #156190614
package-tests

00:16:47

87.3%
failed #155018130
package-tests

00:16:48

87.3%
 
Name Stage Failure
failed
integration-tests Test
coverage: 75.0% of statements
ok gitlab.com/NebulousLabs/Sia/siatest/wallet 58.186s coverage: 75.0% of statements
Makefile:99: recipe for target 'test-long' failed
make: *** [test-long] Error 1
Uploading artifacts...
WARNING: /builds/NebulousLabs/Sia/SiaTesting: no matching files
WARNING: /builds/NebulousLabs/Sia/cover/cover.out: no matching files
ERROR: No files to upload
ERROR: Job failed: exit code 1