Is a courthouse mandatory to quell occupational unhappiness?
Until you build a courthouse, the city will always be "occupied" and generate unhappiness. Once built, the city will be like any other that you would have settled yourself with respect to the (un)happiness it contributes.
It seems to have the effect of putting a soft cap on how many cities you can annex at a time (to avoid going into negative happiness and severely stalling growth), as it is either fairly pricey, or it will take a few dozen turns to build. You can finish it in 2 turns with a Great Engineer's "Hurry Production", however.