Patriot Act powers to expire at midnight as Senate admits House deal is ‘now the only realistic way forward’ on surveillance impasse