enum flags is made as anonymous enum and typedef int flags added

This change was made to solve the following bug:
http://trac.xapian.org/ticket/616
The enum named flags is converted to an anonymous enum and a typedef int flags has been added instead.

With these changes the bug has been solved.