Beryllium-hydrogen ultrathin films. II. Ground-state properties of the dilayer.