A Convex Characterization of Robust Stability for Positive and Positively Dominated Linear Systems