Gleason's problem and homogeneous interpolation in Hardy and Dirichlet-type spaces of the ball