Fayet–Iliopoulos terms in supergravity and D-term inflation