Police fatally shot dead a man armed with a knife after a confrontation in the foyer of the Quakers Hill police station in northwest Sydney.