This is going to depend on the map, how far the resupply cabinet is from a building area, where you want to deploy your sentry, and what sort of ammo supplies are near the desired deployment area.
If you know there is a full ammo pack, or a couple of a 100-metal ammo packs, near your desired location, you should probably just build it there and get resupplied without going back to spawn. You will fare better if you drop your dispenser before your sentry as well, and make sure to help it build faster while you wait for ammo to respawn... this will give you an extra ammo boost for upgrading your sentry. In general I think this is the faster option.
However, if you know of a good sentry position that has no ammo nearby (or only a small 41-metal item), and you won't have too far to run between the resupply cabinet and a buildable area, and that buildable area is pretty close to the place where you want your sentry, then this option can be faster. I'd say for most maps it isn't the better option. It does have one nice feature though: you can keep the sentry out of danger until the enemy uses their first ubercharges and avoid rebuilding the gun.
Above all keep in mind that it's almost always better for your team to build a level 3 teleporter and dispenser than it is to have a level 3 sentry. A level 1 sentry with player support is still pretty effective, and the healing of your dispenser and fast replacement of allied players is MUCH better than the extra damage you get from a level 3 sentry in almost all scenarios. Also, offensive teams almost always build an ubercharge or two during setup time, which they will often use to immediately clear out any sentries that are nearby (but will rarely use to target teleporters and dispensers).
You can reduce damage and fly farther by jumping and crouching in mid-air as you shoot the rocket.
To answer your other question, I present you a page of helpful videos instead.
Best Answer
The default sniper rifle deals 50 damage un-charged, and 150 damage when fully charged. It takes 1.5 seconds to reload the sniper rifle after the first shot, and a further 3.3 seconds to fully charge it. A level 3 sentry has 216 hit points.
The quickest way to destroy a level 3 sentry is one fully charged shot, followed by a one-sixth charged shot. It takes 3.3 seconds to fully charge one shot (150 damage), 1.5 seconds to reload, and 0.528 seconds to charge it 16% of the way (66 damage), for a total of 5.328 seconds. Slightly slower is five uncharged shots, requiring four reloads taking a total of 6 seconds.
The quickest way to destroy a level 1 or 2 sentry is a series of quick shots. A level 2 sentry has 180 hit points, and will be destroyed by one charged shot and one quick shot (total 4.8 seconds) or four quick shots (total 4.5 seconds). A level 1 sentry has only 150 hit points and will be destroyed in one charged shot (3.3 seconds) or three normal shots (3 seconds).
If an engineer starts repairing the sentry, he can heal 105 damage per hit, every 0.8 seconds. If the engineer is continually healing his sentry, you can't fire the second shot quickly enough to destroy it. If he has no dispenser, he will run out of metal before you run out of ammo, but it will take around thirty seconds.
Alternate weapons: Two weapons are even faster than the default sniper rifle for taking out sentries. The Machina deals 173 damage instead of 150 when fully charged, and can take out a level 3 sentry in one charged hit plus one uncharged (4.8 seconds). The Sydney Sleeper charges 25% faster and can take out a level 3 sentry in 4.748 seconds.