Refs #4154: Use the Chrome.cc_list function to parse the ticket['cc'] string into a list, since it will handle the case that ticket['cc'] is None, which presumably would arise from having a NULL entry in the database. It is not clear when this might happen since an empty cc field results in the return of an empty string in Trac 0.12, but the issue has been reported by multiple users.

Fixes #9787: Fixed conditional check for a valid resource.id to resolve an error when navigating to a attachment/ticket/id page. Previously, the resource.id was only checked to determine if it was None.

Refs #4043: Pass resource and id to the context, which seems to solve the issue that images require the realm and id to be specified (i.e. [[Image(wiki:WikiStart:myfile.png)]] worked, but [[Image(myfile.png)]] didn't.)