Red Hat Inc. and Lenovo Group Ltd. are giving away free patents to any startup that joins a group of more than 200 companies devoted to keeping its members and their patents out of court.