add .Rbuildignore
add global declarations
use .self$<- to avoid R CMD check note
additional R CMD check fixes