[bug 980347] Fix domain extraction

This fixes domain extraction so that it properly handles the myriad of
url possibilities rather than the previous iteration which did a
mediocre job of handling just United States ones.