New patch that fixes all reported issues, I think:
- Added test for ALTER DATABASE / REFRESH COLLATION VERSION
- Rewrote AlterDatabaseRefreshCollVersion() with better locking
- Added version checking in createdb()