Uniqueness of the infinite cluster and continuity of connectivity functions for short and long range percolation