Certificates of deposit (CDs) and Treasuries both can offer steady, predictable investment income—but how to decide between them? Here are five factors to help you choose.