Shane Long's powerful finish handed the Republic of Ireland a memorable victory over Germany in Group D.