nine: handle D3DISSUE_END without previous D3DISSUE_BEGIN

This patch allows an D3D application to call Query:Issue(This, D3DISSUE_END),
without having previously called Query:Issue(This, D3DISSUE_BEGIN).
The function will now call begin_query on D3DISSUE_END if it was not called
before, after verifying that the query do support a call to begin_query.

This patch fixes black screen with games based on the Unreal Engine 3.
It was tested that it fixed the issue in Tera Online, Borderlands 2 and Homefront.

Signed-off-by: John Ettedgui <john.ettedgui@gmail.com>