slack importer: Refactor script for easier unit tests.
slack importer: Refactor script for easier unit tests.

This is to break the bigger functions into smaller
ones and hence, makes unit testing easier.

Also includes renaming the stream's topic name to 'from slack'.

tommyip/zulip,dhcrzf/zulip,jackrzhang/zulip,showell/zulip,showell/zulip,zulip/zulip,punchagan/zulip,zulip/zulip,showell/zulip,eeshangarg/zulip,rishig/zulip,dhcrzf/zulip,synicalsyntax/zulip,brainwane/zulip,rishig/zulip,dhcrzf/zulip,hackerkid/zulip,kou/zulip,eeshangarg/zulip,eeshangarg/zulip,rht/zulip,kou/zulip,brainwane/zulip,rht/zulip,shubhamdhama/zulip,brainwane/zulip,tommyip/zulip,andersk/zulip,rht/zulip,showell/zulip,eeshangarg/zulip,rht/zulip,hackerkid/zulip,rht/zulip,punchagan/zulip,dhcrzf/zulip,timabbott/zulip,timabbott/zulip,eeshangarg/zulip,rht/zulip,shubhamdhama/zulip,synicalsyntax/zulip,eeshangarg/zulip,hackerkid/zulip,showell/zulip,rishig/zulip,shubhamdhama/zulip,synicalsyntax/zulip,showell/zulip,brainwane/zulip,andersk/zulip,synicalsyntax/zulip,timabbott/zulip,timabbott/zulip,hackerkid/zulip,kou/zulip,rishig/zulip,punchagan/zulip,jackrzhang/zulip,zulip/zulip,jackrzhang/zulip,brainwane/zulip,zulip/zulip,andersk/zulip,timabbott/zulip,brainwane/zulip,eeshangarg/zulip,kou/zulip,synicalsyntax/zulip,shubhamdhama/zulip,shubhamdhama/zulip,shubhamdhama/zulip,jackrzhang/zulip,zulip/zulip,rishig/zulip,hackerkid/zulip,dhcrzf/zulip,tommyip/zulip,shubhamdhama/zulip,andersk/zulip,tommyip/zulip,tommyip/zulip,timabbott/zulip,tommyip/zulip,brainwane/zulip,andersk/zulip,zulip/zulip,hackerkid/zulip,rishig/zulip,rishig/zulip,jackrzhang/zulip,showell/zulip,punchagan/zulip,jackrzhang/zulip,hackerkid/zulip,dhcrzf/zulip,zulip/zulip,punchagan/zulip,rht/zulip,dhcrzf/zulip,kou/zulip,jackrzhang/zulip,tommyip/zulip,punchagan/zulip,punchagan/zulip,andersk/zulip,andersk/zulip,synicalsyntax/zulip,kou/zulip,synicalsyntax/zulip,timabbott/zulip,kou/zulip