Bug fix for issue #28

Bug fix for issue #28
Release 1.6.1

Bug fix: incorrect code when logging bad date format (#28)
Preparing release 1.6.1

Bug fix: incorrect code when logging bad date format (#28)
Preparing release 1.6.1

Bug fix: incorrect code when logging bad date format (#28)
Save POSIX timestamp instead of formatted string

Previously, the user could break all timestamps of his entire history
file just by switching the format string, which we can not allow to
happen. Now the format is only used when migrating the data and
displaying the absolute timestamp in the panel.

Closes #28.
Add commands to palette for accessing settings

I did this with all my other packages and I hope other package authors
do it too. Using the menu compared to the fuzzy search of the palette is
just ridiculous.
Match default timestamp format in settings

They were different which could result in ... issues before the switch
to POSIX timestamps. Anyway, they shouldn't be different in the first
place so the code's now matches the settings'.

See #28.
Revert c6976fc2..d06d1256 (1.6.1 release prep)

We're not ready for release and with the latest changes it must be a new
minor anyway.
Shorten clean_history a bit
Remove the action key from history entries

The action is save in the entries' parent dict key ('opened' or
'closed') so there is no need for the action to appear again in every
entry.

There were cases previously were the action was missing I suppose (for
some reason) and 'accessed' was used, but that shouldn't happen anymore.

Closes #30.
Don't trigger a save for each proj while cleaning
Optimize querying selected history entry

Previously it was called 3 times with always the same result, so we can
just cache it.
get_history_index => get_history_by_index

No idea what I was thinking~
Merge branch 'no_action_key' into dev
Use singleton metaclass instead of classmethod

Reduces instance access code from `FileHistory.instance()` to
`FileHistory()`.

Closes #29.
Run plugin_loaded on ST2 on module load
Fix metaclass usage for ST3

This is a very nifty method to make metaclasses work for both ST2 and
ST3 since the Python 3 syntax for specifying metaclasses is incompatible
with Python 2 but instantiating the metaclass directly works fine. And
since baseclasses influence the used metaclass, this works just fine.

Really closes #29.

Source: https://github.com/ipython/ipython/blob/c0c14f8d36ccdfe2748dffa0a6269b6b01f8ea05/IPython/utils/py3compat.py#L242-L244
Use `%r` for setting debug instead of `"%s"`
Queue deletion of entry during preview

- Correctly handle removing missing files during preview without making the quick panel inconsistent with the history (only relevant when `remove_non_existent_files_on_preview` is enabled).
- Corrected bug in `get_history_by_index` that caused an error when the user selected the first entry from the `opened` list (see #29).
Renamed procedure, immediately remove in add_view

Renamed `__remove_view` to `__queue_delete` to be more consistent with the behaviour of the procedure.
Directly delete the history entries in the `else` case of `add_view` since we don't want the delete to be queued.