The Canada Elections Act does allows for a writ to be withdrawn, but only with some important limitations (emphasis added):
59. (1) The Governor in Council may order the withdrawal of a writ for any electoral district for which the Chief Electoral Officer certifies that by reason of a flood, fire or other disaster it is impracticable to carry out the provisions of this Act.The key point in this section is that an order to withdraw a writ is available only based on the Chief Electoral Officer's determination that it's impracticable to proceed with an election. And the limitation by "electoral district" is also likely to be significant, as it reflects an intention to account for local disasters rather than a desire for a do-over across the country.
(2) If the Governor in Council orders the withdrawal of a writ, the Chief Electoral Officer shall publish a notice of the withdrawal in the Canada Gazette and issue a new writ ordering an election within three months after publication of the notice.
(3) The day named in the new writ for polling day may not be later than three months after the issue of the new writ.
Now, Harper might try either to claim some inherent authority to stop an election in its tracks, or to bully the Chief Electoral Officer into interpreting the provision extremely broadly. But it's doubtful that either the Chief Electoral Officer or Governor General would go along with those types of moves in the face of what the law says (particularly in the absence of any statement that discretion is reserved).
The more real danger is then that rather than using a message of fear to avoid the election altogether, he'd instead try to lean on the last issue where he's had any success turning public opinion in his favour over the last couple of years.
But the example where that's worked may limit the possibility of a repeat performance. After all, the Cons (with the Libs' support) were able to impose their own choice of limitations on rights in the name of security by passing C-51. So an actual attack or threat would only serve as an indictment of the Cons' failure to accomplish what they promised.
Alternatively, the Cons could be planning for an announcement of arrests or C-51 "disruptions" as a means of claiming success. But that would only go so far in changing the subject, particularly if the public has already tuned Harper and his party out for other reasons.
In sum, while we need to watch out for fearmongering as the last arrow in Harper's quiver, it's not clear that it will serve either as an excuse to avoid the polls or a major factor in shifting votes.