Exactly solvable model of the linear harmonic oscillator with a position-dependent mass under external homogeneous gravitational field