Electromagnetic form factor of the pion in the space- and time-like regions within the front-form dynamics