Making Reliable and Flexible Decisions in Long-tailed Classification