Electronic and phononic states of the Holstein-Hubbard dimer of variable length