MT#6485 Container detection in init script

Core dump configuratino and certain ulimit operations don't work
when running inside a container like docker, lxc or openvz:

| # /etc/init.d/sems status
| /etc/init.d/sems: 53: /etc/init.d/sems: cannot create /proc/sys/kernel/core_pattern: Permission denied
| /etc/init.d/sems: 54: /etc/init.d/sems: cannot create /proc/sys/fs/suid_dumpable: Permission denied
| /etc/init.d/sems: 59: ulimit: error setting limit (Operation not permitted)