Added database migration to trim texts in all existing entries.

This complements commit 2afdb78083009ac753bc1c5203645e32e78aa4f9. That commit applies the fix to entries that will be saved from now on; this commit applies the fix to already existing entries.