Courts in Brazil will be able to determine shared custody arrangements for the pets of separating couples under new laws.