when uploading a layer, it might take longer than 4 seconds in which case the previous code would add the layer to geoserver but all steps that followed in geocode would fail. this code checks every 2 seconds and waits as long as 1 min for upload to complete. needed for slower server, busy server, or larger data.
Merge pull request #1008 from smesdaghi/waitforupload

when uploading a layer, it might take longer than 4 seconds in which cas...