Update spm.py

- better search with and/or
- reading and writing to db refactored a little
- changed db format to include some other meta data
- added timer to password clearing
- arrow keys, backspace, delete  work on the input fields now