Union membership in Massachusetts has fallen to its lowest level in three years.