Detailed observations of NGC 4151 with IUE – IV. Absorption line spectrum and variability