The boundaries and twist defects of the color code and their applications to topological quantum computation