RAM: a Relativistic Adaptive Mesh Refinement Hydrodynamics Code