Ghana's high court has dismissed a bid to force the president to sign a tough anti-LGBT bill passed by parliament in February.