Smartstore error handling changes

Using NSException internally
And NSError for public APIs