Add Promise polyfil for PhantomJS
Update SidebarInjector to use promises

This reduces the callback mess in the file.
Convert rest of SidebarInjector to use promises