add new files for location rules
Merge branch 'master' into master+location_rules
location rules: add menu entries
add process location rules after entities

Also make sure the location is set

fixes #1919
closes #1149, 2062