Ensure that Custom Fields submitted are saved to the database.

There was a regression in 4.0.9 (a64a16d1c) which meant that even if you
had SeeQueue, CreateTicket, ModifyCustomField and SeeCustomField and the
custom field appeared for editing, it would be lost during the
submission.  If you had ShowTicket, it worked fine.
Check the id from the table and by loading the Object.

An optimization was added in a64a16d1c so that if you were trying to
find the "Custom Field Object" from a Ticket, it would shortcut and
return $ticket->Queue rather than loading $ticket->QueueObj->Id.

Unfortunately, $ticket->Queue is protected by ShowTicket while
$ticket->QueueObj->Id is protected by SeeQueue.  It's not uncommon in RT
for a user to be granted SeeQueue and CreateTicket but not be given
ShowTicket (a dropbox queue where you create tickets but then don't see
them anymore).

In this setup on 4.0.9, any custom field values entered on
Ticket/Create.html will be silently discarded because $ticket->Queue
returns undef. This results in the Custom Field not being found and
AddCustomFieldValue not saving it.

This was revealed in the RTIR test suite which tests just such a
scenario using Constituencies (you can submit a ticket that you then
can't see because it belongs to a separate Constituency).
Merge branch '4.0/customfieldlookupid-acl-regression' into 4.0-trunk