Even if allegations are serious, every undertrial should be presumed innocent, court tells enforcement agencies