Added #persisted? functionality and tests for it.