Hard X-Ray Emission from Partially Occulted Solar Flares: RHESSI Observations in Two Solar Cycles