Topology, sequence evolution and folding dynamics of an immunoglobulin domain