Amplitude Analysis of the B0(s) → K∗0 anti-K∗0 Decays and Measurement of the Branching Fraction of the B0 → K∗0 anti-K∗0 Decay