Multicanonical thermostats and barostats