tdb: add overflow/ENOSPC handling to tdb_expand_file()