[REM] unused stack_result parameter
[IMP] use sorted + key instead of sort + cmp
[IMP] don't pointlessly recreate view_obj every time _views_get is called, better use of pool & data APIs
[IMP] no need to ensure an actual context if the method does not use it

just forwarding the context object does not count as using it, if callees want
a context they can ensure they've got one on their own
[IMP] use sets to check for groups/ACL

rco notes that group tests are generally intersections, if the user has *any*
group set on the object he can see/use it. This change is a literal
translation of the original semantics, which may be wrong.
[IMP] use set to collect inherit_id and inherit_option_id

Also add a few comments to note understanding of code
[IMP] dict(int: True) -> set(int)
[IMP] renamed some stuff for clarity
[ADD] application field & check during inheriting views read
[IMP] prevent changing a view from application: always to application: disabled

not sure that's actually useful, and can still go always -> enabled -> disabled...
[IMP] inherit_option_id -> application
[IMP] application field doc
[MERGE] Replace inherit_option_id by a selection field (PR #229)
Subtree merged in odoo/master