catch up commit, with suggested changes and additional fixes

Changed bean.setPrimaryKey() to always cascadePrimaryKey().  Removed cascadePrimaryKey() call from rb.create() since setPrimaryKey() now does that.

Refactored bean.exportScope() because it was exporting the bean object and not calling bean.export() for owned beans when the bean key was passed as an argument.