optimize default structure of notifications table and requests
Requests to notification table have conditions like
- uid=(uid)
- uid=(uid) AND ref=(ref)
- date=(date) AND uid=(uid) AND ref=(ref)
But doc suggests to create a primary key on (date, uid, ref), and order of fields matter. That is, this index is useful only for requests with condition like in last item. Primary key must be on (uid, ref, date).
As same, SQL requests in LL::NG::Portal::Notifications::DBI should have conditions in that order, (uid, ref, date). This is useless in MySQL since MySQL would permute the conditions, but it might be useful for other DB, and it is cleaner.