Use id for math anchor if possible

Previously the user specified ID attribute of the
math element was ignored by the MathSearch extension.

Now MathSearch takes into account the ID.

* Attention this patch requires that the table
mathindex is MANUALLY deleted and recreated. The old
data can not be reused, therefore a database patch
is not provided.

Change-Id: I1c339c2040693971748955baf8376f771f5096d2