Canada, the UK and Australia have formally recognized a Palestinian state, joining a growing global consensus and pushing ahead with a policy that has drawn criticism from US President Donald Trump.