Check GtkIMContext:input-purpose to disable IM on lock screen

Recent GtkIMContext has "input-purpose" property, which can be used to check if the target widget is a password entry, in a more reliable way.

BUG=none
R=Shawn.P.Huang@gmail.com

Review URL: https://codereview.appspot.com/7064059