layer: add getters for opacity and visible.

closes #2