This commit adds the `BKE_brush_duplicate` function that performs a deep copy of a brush ID and all associated IDs into the current Main database. Unit tests are added with this case to ensure that grandchildren and embedded data is handled correctly for both Sculpt and Grease Pencil brushes, as the latter contains more ID references than other brush types. Related to #138105 Pull Request: https://projects.blender.org/blender/blender/pulls/138629