US judge dismisses lawsuit accusing UN agency for Palestinian refugees of funding Hamas