This PR adds C and Python API support for `mlir::DynamicAttr`. It primarily enables attributes in dialects that are dynamically generated via IRDL to be constructed in Python, and allows retrieving the parameters contained in a dynamic attribute from Python. This PR is quite similiar to #182751, so I use tab to autocomplete some code via github copilot, but manually verified.