Add the defquery macro and IndexKeys protocol