Fix placement bug when inserting new tasks.

If you try to insert a task following the current task and the current
task has blank lines following it rather than other tasks or headings,
the new task would be placed at the last possible blank line, leaving a
gap in between.

But not anymore.