Certain people add attachment, before filling mandatory fields
which will raise Missing Fields error.
Or any other kind of errors raised by different validators due to which
file is uploaded but doc is not saved.
This will lead to orphaned/mislinked files. ex. new-purchase-receipt-1
This fix changes name of new docs to new-<doctype>-<no>-<10digithash>
after saving the document we can use this new name to find any mislinked
files created in past hour and relink them to the new doc on save.