Refactor out common parts and add SX1272 support to SX127x bindings. Signed-off-by: Ilya Tagunov <tagunil@gmail.com>