Refactoring cake_query.erl
Corrected refactoring bugs
corrected refactoring bugs of simple_query
Making sure file is always closed after querying
Added alexandre's patch for last_entry_at logic error
Adding temporary code to allow merge with unsable without conflicting. This code does not run and should be patched as soon as possible following the TODO instructions
Merge branch 'unprocessed_data' into unstable
removing undesired code in consistency with the TODO instructions