Changing the behavior to support buntdb across different operating systems
as the following crash encountered on windows while renaming in shrink:
```
panic: buntdb: rename mydb.tmp mydb: Access is denied
```
This commit ensures that the absolute unix expiration timestamp
is stored for applicable records in the persisted db file.
Previously the relative seconds was stored.
fixes#85
This commit wraps the errors that could, under rare a occasion,
cause a panic. Allowing for a graceful recover by select
conditions.
Please see #82 for more info
When creating an index with CreateIndex, a pattern is used to specify
the matching keys that should be stored in the index. It is therefore
unexpected that items that do not match the pattern will be presented to
the less function that is also supplied on CreateIndex. This change
corrects that problem by applying the pattern in two paths previously
not considered:
1. When an item is replaced in the database.
2. When an item is deleted from the database.
This commit allows for BuntDB to load data files that were
previously considered invalid or corrupted.
Now when the data file ends with an incomplete command, the data
will be truncated at the end of the previously success command.
Also when a null control character is encountered instead of an
asterix, which indicates the start of a command, the null is
ignored and the cursor moves to the next byte. This allows for
null padding at the head and the tail.
Fixes#71https://github.com/tidwall/tile38/issues/600