Added member attributes and extended ExecutorService to support executio...

...n of tasks based on attributes

New version of #533 and requested by #1457. Finally had time to merge it back to the latest version.