Analytical calculation of pressure for confined atomic and molecular systems using the eXtreme-Pressure Polarizable Continuum Model