Simplify deletion of records.

Use store.getById to simplify finding of records and use unloadRecord
instead of deleteRecord so dirty old records do not remain in the store.