Iconic Glasgow building to pass into community hands