Only change collation for functional tests

The unconditional module-level change of the locale collation can
affect other tests run under nose. To avoid this, make the change at
the package level, and restore it when finished.

Change-Id: Iacda42aa7155f1cfa7d0dcadbf73b961dfb4b923
Merge "Only change collation for functional tests"