clearAll function for NSUserDefaults
extension NSUserDefaults {
func clearAll() {
let dictionary = self.dictionaryRepresentation()
for (item, value) in dictionary {
let key = item as String
removeObjectForKey(key)
}
self.synchronize()
}
}