Query parser first implementation

Let's merge this into mdarse/Phraseanet master,
we can start setting everything up.