Swedish premier resigns after left-wing bloc wins election