Use more tables for external indexes

And many other things:

- fixup cache usage, cleanup, records expiring
- split some tables in two and use indexes in smaller one
- add more caches - names, nodes, attributes
- delay inode attributes update - was too many queries on write operations
- fixup transaction usage - now bulk updates and inserts if autocommit disabled