Calm has been restored to the border following a tense standoff between the Lebanese and Israeli armies, as the latter removed an apparent spy device from a disputed area.