fix memory leak I created when I moved the ivars to @property
some minor changes in Countly class to ensure internal state is set correctly at all times