Adds optional RecordCondition to the record method.

Adds an optional RecordCondition parameter to the ```record()``` method. RecordConditions include ```RECORD_ALWAYS``` (default), ```RECORD_ONCE_PER_INSTALL``` and ```RECORD_ONCE_PER_IDENTITY```. Deprecates ```recordOnce()```, which was the equivalent to using ```RECORD_ONCE_PER_IDENTITY```.