Add headers, clean-up a bit for core
Remove unused idx functions
Whitespace
Refactor

Remove dead code. Shape up jsonb.h.