Check key expiration before deleting

Deleting an expired key should return 0, not success.

Fixes #1648
Add test for deleting an expired key

Verify proper expire-before-delete behavior.

This test passes with the expire-before-delete commit and fails
without it.
Merge pull request #1677 from mattsta/expire-before-delete

Check key expiration before deleting