Fixes for memory leaks and also allowing an array for RIButtonItems in the initialiser

Fixed some memory leaks.

Added initializer to allow setting of button items via an array because sometimes we want to be able to generate the buttons in an action sheet/alert view dynamically.