Compact instantaneous water heater