HQRII: A fast diagonalization subroutine