What is the difference between a circuit with a resistor and one without it in energy terms? In Fundamentals of Physics (HRW), an equation is derived for the current in a circuit in terms of its emf and resistance by the 'Energy method'; that is, deriving $\epsilon = i \cdot r$  and saying that the work done per unit charge ($\epsilon$) by the (ideal) battery is equal to the thermal energy dissipated per unit charge (i.r).
We know that the (ideal) battery will pump charges with the same emf and do the same work on the charges if or if not the resistor is in the circuit. So if the resistor is not in the circuit, where will the work done by the battery go if there is no resistive dissipation ? In other words, what will happen to the battery if its ends are connected across a super conducting wire ? Will it discharge like a capacitor ?If not, please tell me why the electrical circuit theory is meaningless without resistance.
Many teachers give an analogy between electric circuits and fluid flow in a circuit consisting of pipes and a motor as a battery. If possible, can anyone give me such an analogy with a circuit with zero resistance, internal and external ?
Please feel free to edit and add relevant tags to the question.
 A: Your original text admitted three interpretations, and I'm leaving the answers here:
1: What happens with a toy model when there's a circuit with an ideal battery and no resistance?
All the charge moves around the circuit at one moment in time (infinite current). The energy must leave the system as Electromagnetic radiation - accelerating charges radiate, and while that radiation would happen at any bends in the wire, it would probably happen most at the terminals where the charge goes from stopped to moving (and visa versa). The effect of energy leaving a system via EMR is often ignored in circuits, but basically, we've made a single signal broadcast antenna.
A battery represents two separate reservoirs of charge, so if charge moved between them on the terminal side, the battery would be a rock. Therefore, the work done by the current must happen between the terminals on the wire side. Don't worry too much about this scenario - there's no such thing as ideal batteries. Their internal resistance is orders of magnitude smaller than a circuit's resistance, and orders of magnitude larger than that of the wire.
2: What happens when I connect the terminals of a real battery with an ideal (superconducting?) wire?
Real batteries have internal resistance, so the battery will heat up and quickly either run out of charge or burn/explode. 
3: What happens when I connect the terminals of an ideal battery with a real wire?
We specify battery voltage in circuits, so the current running through the wire will be high enough that when you multiply it by the resistance, you get back the battery's voltage. Also, the wire will heat up quickly and radiate light and heat until the ideal battery runs out of charge.
Some of the other answers included other ideas. 
First, any circuit is a loop, so it will have an inductance. Inductance slows down the current in a circuit, but does not effect the circuit in steady state (or provide a real (pun intended) voltage drop). In the ideal battery/wire case, the inductance would cause the current to grow over time - that's nonsense because infinite current can't grow (you also need non-zero resistance to find the time constant - I don't divide by zero).
Second, we sometimes think of batteries as chemical capacitors. An ideal battery is not a capacitor. But if it were and there were an inductance in the circuit, the charge would move from one side to the other with an angular frequency of $(LC)^{-1/2}$. In response to the edit question, 'Will it discharge like a capacitor?', the time constant for an RC circuit is $RC$, so zero in this case. The battery won't send charges back the other direction in the circuit though because ideal batteries are not capacitors.
Incidentally, a capacitor also slows down the movement of charge, but it reverses the polarity, so the phase moves in the opposite direction. Also of note, whereas an inductor slows down changes in current most when they change most, a capacitor allows the freest flow of current when it is uncharged.
Lastly, it seems pretty clear that you're talking about a closed circuit, but if you weren't, well, nothing happens on open ideal circuits (unless they were recently closed, or will be closed soon).
Responding to other edits:
"If not, please tell me why the electrical circuit theory is meaningless without resistance."
I'm not sure what you're asking, but can we build circuits with just transistors, inductors, capacitors and diodes? I guess, but it'd be a lot more difficult to keep the magic smoke in. Circuits would also be a lot more difficult because we often model speakers, lights, motors and almost every useful thing in a circuit as a resistance. LC circuits (which have no resistors, but non-zero resistance) have a few important applications, but even so, we often put resistors in to dampen non-frequency signals or manage the voltage (with a voltage divider for example).
"If possible, can anyone give me [a fluid flow] analogy with a circuit with zero resistance, internal and external?"
I refer you to the Waterfall, though I had hoped for an aquatic image shaped more like Ascending and Descending. Water does not have an easy analogy for electromagnetic radiation because they are different phenomena. In another direction, flow of fluids is tremendously resistive, so perhaps the analogy you're looking for is that as fluids (and circuits) get colder, resistance goes down. The behaviors of both of these systems are subject to laws that are very foreign to our understanding as warm intuitioned creatures, and they won't help you in your circuits class.
A: The battery doesn't do any significant work if there's nothing connected to it.
You can think of a battery with nothing connected to it as being a battery with an extremely large resistor connected to it.  That's even essentially physically accurate, instead of just being an idealization, because although the resistivity of air is extremely high, it's not infinite.  The result of the extremely large resistance is that the current is extremely small, i.e., there are very few charged particles per second on which the EMF performs work.  But since EMF is the work per unit charge, it's not inconsistent for the EMF to remain constant, even though the total work done by the EMF is extremely small.
A: In a perfectly ideal circuit without any resistive losses (even internal to the battery), energy will flow to fill capacitance with charge, and be stored as an electrical field but the transient flow will also create magnetic fields in any inductance. Without loss, the energy will bounce back and forth between the inductance and capacitance as magnetic and electrical fields. That initial work is not lost, just bouncing back and forth between the fields.
A: In addition to the good answers above here is something to think about.
If the resistance is zero then for a current to flow there does not need to be a battery - the emf can be zero. No work is done as the current flows.
This may sound like a strange case, but it is how many strong magnets work in nmr (nuclear magnetic resonance) spectrometers. The have a 'loop' of superconducting 'wire' and no battery in the circuit. Magnetic inductance is used to start a current flowing in the loop. And the current keeps flowing in the loop. Forever. Provided that the superconductor remains a superconductor. In practice, this means keeping the 'wire' cold, frequently with liquid Helium. If the 'wire' stops superconducting then resistance goes up, energy is dissipated and it can be expensive. 
If I remember correctly the problems with the large hadron collider and the hunt for The Higgs Boson was held up by similar damage to magnets / loss of liquid helium following an electrical fault where part of the problem was superconductors heating up and not being superconductors any more.
(Next part in response to comment below)
so what if a battery with zero internal resistance was connected... 
... first I refer again to the other good answers to this question,...
... but I would like to add the point that when a superconducting ring of wire is 'charged up' with current by magnetic indcution it is a bit like a battery being connected to the circuit and the energy goes into the magnetic field generated. Normally, magnetic induction generates an emf or potential difference in a wire - with a superconductor the resistance of the wire is zero and thus a current starts to propagate immediately to counteract the magnetic induction so that in fact no emf or potential difference is induced. 
Hope this is helpful to think about this question with respect to real physical superconducting magnets used today.
