mesa: add _mesa_add_sized_state_reference() helper