You should definitely consider the Canada option for PR, as the US is unlikely to be more welcoming for work-related immigration or green cards in the near future. I’m an American who has lived in Canada twice (for grad school and for work), and I have a cross-border company that builds engineering teams in Canada for US tech companies. You will find a country that is very friendly to immigrants, has a high quality of life, is very scenic, safe, and has a booming tech scene.
As far as employment, you have a couple of options that I’ve detailed in my posting: H-1B denied? Canada could be your solution.
Find out if Syndesus can help you work remotely from Canada, while you continue to work with your US employer.