More speed up for pkg update

During mass insert only create indexes after the insert
Add entries to the fts table after the mass insert as well
Disable foreign_keys