The resource theory of asymmetry and some of its applications