Some minor bug fix tweaks and update to latest android studio

Not sure if the dialog.cancel will fix the issue though, need to look more into how the dialog cancelling is handled/when it's done.
Fix issues with jumping to pages in threads

The crash was occurring because the FragmentStatePagerAdapter doesn't update the fragment locations in the array it stores when item positions are changed. Because of this when we move the fragment from 0 to its proper page number the array in the adapter wouldn't see this change and so when trying to destroy the item later we'd get an index out of bounds exception. This is fixed by adding the MovableFragmentStatePagerAdapter which is almost identical to the FragmentStatePagerAdapter but will also check the hasMovedPages function in startUpdate and if pages have moved it will adjust their locations in the array accordingly. This seems to work quite well!