Don't use single DB transaction when rebuilding full-text index

This might slow down the rebuild, but it will hopefully also prevent
excessive memory usage and crashing.