A multicanonical algorithm for SU (3) pure gauge theory