Include intermediate fragments when initializing remainingFragmentCount

Ignore QueryState.COMPLETED messages in jdbc.

This was causing the Query Complete message to get sent before the query had actually completed.