State immersion observers for mechanical systems with impacts