Make products searchable by the code in pos.

In the advanced search dialog for the POS, make it easy to find the products
using its code.

Change-Id: Ib881e1ea813798e24935a8cf15851457dde75472
Unbreak plugins after recent refactorization

The app object the plugin events get no longer have a main_window property

Change-Id: Ie21961850ca702d2b0326b39f129e2645a4d05dc