make user and table parameter of mysql_grant() optional

Because name must match user and table parameters,
extract user and table defaults from name.

Struggled on this while trying to grant several users once using ensure_resource.

This will now work:

    $user_grant = {
      privileges => [ ... ],
      provider   => 'mysql',
    }
    $users = [ 'me@localhost/table.*', 'me@10.10.%/table.*' ]
    ensure_resource('mysql_grant', $users, $user_grant)