Discrete analogs of hyperspherical harmonics and their use for the quantum mechanical three-body problem