Hylleraas–Pekeris treatment of D‐dimensional two‐electron atoms