Use ~.qgis2 and ~/.config/QuantumGIS/QGIS2.conf for settings for QGIS 2. Added unit test for memory provider.