Tidy up SRVRecord.

Adds an AutoCloseable version of InitialDirContext.
Fixes-Issue: CLIENT-521

Change-Id: I5248d2f50ec8da01c90fd607e72c5eac66451cf3
Reviewed-on: http://gerrit.dmdirc.com/3950
Reviewed-by: Chris Smith <chris@dmdirc.com>
Automatic-Compile: DMDirc Build Manager