Rainbow paths and trees in properly-colored graphs