There was a free latency testing tool that worked well under Win7 and earlier but changes in the Win8 kernel broke it.
Right now the best way to test what latency is seems to be the audio track-interface-audio track method suggested above. Which is pretty much what the free tool did anyway.
As for matching phase with the source track, phase is affected by more than just any post-process latency delay on any looped back track. The two tracks can be in perfect time sync but still have phasing issues unless the hardware doesn't cause a phase shift in the audio as it processes it.
Parallel compression done by mixing two tracks, one compressed the other not, rather than one track and a compressor with built-in parallel processing can be a bit tricky at times because of this. Sometimes it's better to align phase between the tracks so they don't null each other out and forgo sample-accurate time alignment.
Edited to add-
By the way, setting a permanent offset for external hardware effects in Sonar is fine unless you use more than one digital processor or a mix of analogue and digital hardware processors, because different digital devices are very likely to have different processing times, which makes a "one setting for all purposes" solution less than ideal.